mh-two-thousand-and-two
2024-03-25 b8c93990f3fa5e50a8aca16bdc9c2758168aa0fd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { Config } from 'core/config'
import { Component } from './component'
 
/**
 * @internal
 */
export interface GlobalAPI {
  // new(options?: any): Component
  (options?: any): void
  cid: number
  options: Record<string, any>
  config: Config
  util: Object
 
  extend: (options: typeof Component | object) => typeof Component
  set: <T>(target: Object | Array<T>, key: string | number, value: T) => T
  delete: <T>(target: Object | Array<T>, key: string | number) => void
  nextTick: (fn: Function, context?: Object) => void | Promise<any>
  use: (plugin: Function | Object) => GlobalAPI
  mixin: (mixin: Object) => GlobalAPI
  compile: (template: string) => {
    render: Function
    staticRenderFns: Array<Function>
  }
 
  directive: (id: string, def?: Function | Object) => Function | Object | void
  component: (
    id: string,
    def?: typeof Component | Object
  ) => typeof Component | void
  filter: (id: string, def?: Function) => Function | void
 
  observable: <T>(value: T) => T
 
  // allow dynamic method registration
  [key: string]: any
}