2022-05-23 17:21:17 +08:00
|
|
|
import { initMixin } from './init'
|
|
|
|
import { stateMixin } from './state'
|
|
|
|
import { renderMixin } from './render'
|
|
|
|
import { eventsMixin } from './events'
|
|
|
|
import { lifecycleMixin } from './lifecycle'
|
|
|
|
import { warn } from '../util/index'
|
|
|
|
import type { GlobalAPI } from 'typescript/global-api'
|
2016-05-14 06:30:04 +08:00
|
|
|
|
2021-04-03 22:06:56 +08:00
|
|
|
function Vue(options) {
|
2022-05-23 17:21:17 +08:00
|
|
|
if (process.env.NODE_ENV !== 'production' && !(this instanceof Vue)) {
|
|
|
|
warn('Vue is a constructor and should be called with the `new` keyword')
|
2016-09-29 03:33:29 +08:00
|
|
|
}
|
2022-05-23 17:21:17 +08:00
|
|
|
this._init(options)
|
2016-04-14 17:21:48 +08:00
|
|
|
}
|
|
|
|
|
2021-04-13 23:21:54 +08:00
|
|
|
//@ts-expect-error Vue has function type
|
2022-05-23 17:21:17 +08:00
|
|
|
initMixin(Vue)
|
2021-04-13 23:21:54 +08:00
|
|
|
//@ts-expect-error Vue has function type
|
2022-05-23 17:21:17 +08:00
|
|
|
stateMixin(Vue)
|
2021-04-13 23:21:54 +08:00
|
|
|
//@ts-expect-error Vue has function type
|
2022-05-23 17:21:17 +08:00
|
|
|
eventsMixin(Vue)
|
2021-04-13 23:21:54 +08:00
|
|
|
//@ts-expect-error Vue has function type
|
2022-05-23 17:21:17 +08:00
|
|
|
lifecycleMixin(Vue)
|
2021-04-13 23:21:54 +08:00
|
|
|
//@ts-expect-error Vue has function type
|
2022-05-23 17:21:17 +08:00
|
|
|
renderMixin(Vue)
|
2016-05-14 06:30:04 +08:00
|
|
|
|
2022-05-23 17:21:17 +08:00
|
|
|
export default Vue as unknown as GlobalAPI
|