Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.

Commit 55602ae

Browse files
committed
feat(schema): sync types of Vite v2.9.x
1 parent f5301e9 commit 55602ae

File tree

1 file changed

+8
-3
lines changed
  • packages/schema/src/types/global

1 file changed

+8
-3
lines changed

packages/schema/src/types/global/vite.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,21 @@ export interface ViteHot {
1414
decline (): void
1515
invalidate (): void
1616

17-
on: (event: 'any', cb: (payload: any) => void) => void
17+
on (event: any, cb: (payload: any) => void): void
18+
send (event: any, data?: any): void
19+
}
20+
21+
export interface ViteGlobOptions {
22+
as?: string
1823
}
1924

2025
export interface ViteImportMeta {
2126
/** Vite client HMR API - see https://vitejs.dev/guide/api-hmr.html */
2227
readonly hot?: ViteHot
2328

2429
/** vite glob import utility - https://vitejs.dev/guide/features.html#glob-import */
25-
glob?(pattern: string): Record<string, () => Promise<Record<string, any>>>
30+
glob?(pattern: string, options?: ViteGlobOptions): Record<string, () => Promise<Record<string, any>>>
2631

2732
/** vite glob import utility - https://vitejs.dev/guide/features.html#glob-import */
28-
globEager?(pattern: string): Record<string, Record<string, any>>
33+
globEager?(pattern: string, options?: ViteGlobOptions): Record<string, Record<string, any>>
2934
}

0 commit comments

Comments
 (0)