diff --git a/packages/schema/src/types/global/vite.ts b/packages/schema/src/types/global/vite.ts index ab5097b4e8..eafddced7d 100644 --- a/packages/schema/src/types/global/vite.ts +++ b/packages/schema/src/types/global/vite.ts @@ -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 Promise>> + glob?(pattern: string, options?: ViteGlobOptions): Record Promise>> /** vite glob import utility - https://vitejs.dev/guide/features.html#glob-import */ - globEager?(pattern: string): Record> + globEager?(pattern: string, options?: ViteGlobOptions): Record> }