global-api.d.ts 972 B

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