2021-04-13 23:21:54 +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) {
|
2021-04-13 23:21:54 +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
|
|
|
}
|
2021-04-13 23:21:54 +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
|
|
|
|
initMixin(Vue);
|
|
|
|
//@ts-expect-error Vue has function type
|
|
|
|
stateMixin(Vue);
|
|
|
|
//@ts-expect-error Vue has function type
|
|
|
|
eventsMixin(Vue);
|
|
|
|
//@ts-expect-error Vue has function type
|
|
|
|
lifecycleMixin(Vue);
|
|
|
|
//@ts-expect-error Vue has function type
|
|
|
|
renderMixin(Vue);
|
2016-05-14 06:30:04 +08:00
|
|
|
|
2021-04-13 23:21:54 +08:00
|
|
|
export default (Vue as unknown) as GlobalAPI;
|