-
Notifications
You must be signed in to change notification settings - Fork 261
TS 实战场景
suyan edited this page Oct 4, 2021
·
1 revision
export interface App<HostElement = any> {
version: string
use(plugin: Plugin, ...options: any[]): this
mount(
rootContainer: HostElement | string,
isHydrate?: boolean
): ComponentPublicInstance
unmount(): void
provide<T>(key: InjectionKey<T> | string, value: T): this
// internal, but we need to expose these for the server-renderer and devtools
_uid: number
filter?(name: string): Function | undefined
filter?(name: string, filter: Function): this
_createRoot?(options: ComponentOptions): ComponentPublicInstance
}
export type Plugin =
| (PluginInstallFunction & { install?: PluginInstallFunction })
| {
install: PluginInstallFunction
}
export type ResponseType =
| 'arraybuffer'
| 'blob'
| 'document'
| 'json'
| 'text'
| 'stream'