UNPKG

988 BTypeScriptView Raw
1// This file is an augmentation to the built-in ImportMeta interface
2// Thus cannot contain any top-level imports
3// <https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation>
4
5/* eslint-disable @typescript-eslint/consistent-type-imports */
6
7// Duplicate of import('../src/node/importGlob').GlobOptions in order to
8// avoid breaking the production client type. Because this file is referenced
9// in vite/client.d.ts and in production src/node/importGlob.ts doesn't exist.
10interface GlobOptions {
11 as?: string
12}
13
14interface ImportMeta {
15 url: string
16
17 readonly hot?: import('./hot').ViteHotContext
18
19 readonly env: ImportMetaEnv
20
21 glob: import('./importGlob').ImportGlobFunction
22 /**
23 * @deprecated Use `import.meta.glob('*', { eager: true })` instead
24 */
25 globEager: import('./importGlob').ImportGlobEagerFunction
26}
27
28interface ImportMetaEnv {
29 [key: string]: any
30 BASE_URL: string
31 MODE: string
32 DEV: boolean
33 PROD: boolean
34 SSR: boolean
35}