Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export warn for Vue 2 #20

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/index.iife.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
VueDemi.isVue2 = true
VueDemi.isVue3 = false
VueDemi.Vue = Vue
VueDemi.warn = Vue.util.warn
VueDemi.version = Vue.version
} else {
console.error(
Expand Down
1 change: 1 addition & 0 deletions lib/v2/index.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ Object.keys(VueCompositionAPI).forEach(function(key) {
exports.Vue = Vue
exports.isVue2 = true
exports.isVue3 = false
exports.warn = Vue.util.warn
exports.version = Vue.version
4 changes: 3 additions & 1 deletion lib/v2/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import Vue from 'vue'
declare const isVue2: boolean
declare const isVue3: boolean
declare function warn(msg: string): void
declare const version: string
export * from '@vue/composition-api'
export {
Vue,
isVue2,
isVue3,
warn,
version,
}
}
2 changes: 2 additions & 0 deletions lib/v2/index.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,14 @@ if (Vue && !Vue['__composition_api_installed__'])

var isVue2 = true
var isVue3 = false
var warn = Vue.util.warn
var version = Vue.version

export * from '@vue/composition-api'
export {
Vue,
isVue2,
isVue3,
warn,
version,
}