global-api.js 850 B

1234567891011121314151617181920212223
  1. declare interface GlobalAPI {
  2. cid: number;
  3. options: Object;
  4. config: Config;
  5. util: Object;
  6. extend: (options: Object) => Function;
  7. set: <T>(target: Object | Array<T>, key: string | number, value: T) => T;
  8. delete: <T>(target: Object| Array<T>, key: string | number) => void;
  9. nextTick: (fn: Function, context?: Object) => void | Promise<*>;
  10. use: (plugin: Function | Object) => GlobalAPI;
  11. mixin: (mixin: Object) => GlobalAPI;
  12. compile: (template: string) => { render: Function, staticRenderFns: Array<Function> };
  13. directive: (id: string, def?: Function | Object) => Function | Object | void;
  14. component: (id: string, def?: Class<Component> | Object) => Class<Component>;
  15. filter: (id: string, def?: Function) => Function | void;
  16. observable: <T>(value: T) => T;
  17. // allow dynamic method registration
  18. [key: string]: any
  19. };