feat(schema): sync types of vite v2.9.x (#5896)

This commit is contained in:
Lay 2022-07-14 22:03:18 +08:00 committed by GitHub
parent c610ead868
commit b81c9c3a92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,7 +14,12 @@ export interface ViteHot {
decline (): void
invalidate (): void
on: (event: 'any', cb: (payload: any) => void) => void
on (event: any, cb: (payload: any) => void): void
send (event: any, data?: any): void
}
export interface ViteGlobOptions {
as?: string
}
export interface ViteImportMeta {
@ -22,8 +27,8 @@ export interface ViteImportMeta {
readonly hot?: ViteHot
/** vite glob import utility - https://vitejs.dev/guide/features.html#glob-import */
glob?(pattern: string): Record<string, () => Promise<Record<string, any>>>
glob?(pattern: string, options?: ViteGlobOptions): Record<string, () => Promise<Record<string, any>>>
/** vite glob import utility - https://vitejs.dev/guide/features.html#glob-import */
globEager?(pattern: string): Record<string, Record<string, any>>
globEager?(pattern: string, options?: ViteGlobOptions): Record<string, Record<string, any>>
}