ImportGlobFunction Type — vite Architecture
Architecture documentation for the ImportGlobFunction type/interface in importGlob.d.ts from the vite codebase.
Entity Profile
Dependency Diagram
graph TD 44ebefd9_5d98_7534_772c_cc269467525f["ImportGlobFunction"] ad1826d8_837d_8a0e_cde0_18df1e7a6131["importGlob.d.ts"] 44ebefd9_5d98_7534_772c_cc269467525f -->|defined in| ad1826d8_837d_8a0e_cde0_18df1e7a6131 style 44ebefd9_5d98_7534_772c_cc269467525f fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
packages/vite/types/importGlob.d.ts lines 55–89
export interface ImportGlobFunction {
/**
* Import a list of files with a glob pattern.
*
* Overload 1: No generic provided, infer the type from `eager` and `as`
*/
<
Eager extends boolean,
As extends string,
T = As extends keyof KnownAsTypeMap ? KnownAsTypeMap[As] : unknown,
>(
glob: string | string[],
options?: ImportGlobOptions<Eager, As>,
): (Eager extends true ? true : false) extends true
? Record<string, T>
: Record<string, () => Promise<T>>
/**
* Import a list of files with a glob pattern.
*
* Overload 2: Module generic provided, infer the type from `eager: false`
*/
<M>(
glob: string | string[],
options?: ImportGlobOptions<false, string>,
): Record<string, () => Promise<M>>
/**
* Import a list of files with a glob pattern.
*
* Overload 3: Module generic provided, infer the type from `eager: true`
*/
<M>(
glob: string | string[],
options: ImportGlobOptions<true, string>,
): Record<string, M>
}
Defined In
Source
Frequently Asked Questions
What is the ImportGlobFunction type?
ImportGlobFunction is a type/interface in the vite codebase, defined in packages/vite/types/importGlob.d.ts.
Where is ImportGlobFunction defined?
ImportGlobFunction is defined in packages/vite/types/importGlob.d.ts at line 55.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free