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

Commit

Permalink
feat(schema): sync types of vite v3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
brownsugar committed Aug 31, 2022
1 parent b90d286 commit bd5ec99
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/schema/src/types/global/vite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,18 @@ export interface ViteHot {

export interface ViteGlobOptions {
as?: string
eager?: boolean
import?: string
query?: string | Record<string, string | number | boolean>
exhaustive?: boolean
}

export interface ViteImportMeta {
url: string

/** Vite client HMR API - see https://vitejs.dev/guide/api-hmr.html */
readonly hot?: ViteHot

/** vite glob import utility - https://vitejs.dev/guide/features.html#glob-import */
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, options?: ViteGlobOptions): Record<string, Record<string, any>>
glob (glob: string | string[], options?: ViteGlobOptions): Record<string, () => Promise<Record<string, any>>>
}

0 comments on commit bd5ec99

Please sign in to comment.