-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathenv.d.ts
More file actions
28 lines (24 loc) · 805 Bytes
/
env.d.ts
File metadata and controls
28 lines (24 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
declare namespace NodeJS {
/** for astro.config.mjs */
interface ProcessEnv {
readonly NODE_ENV: 'development' | 'production' | 'test';
readonly SITE_URL: string;
/** Optional in .env file but always defined in type. Default: false. */
readonly PREVIEW_MODE: boolean;
readonly PLAUSIBLE_SCRIPT_URL?: string;
readonly PLAUSIBLE_DOMAIN?: string;
readonly VERCEL_PROJECT_PRODUCTION_URL?: string;
}
}
// same type repeated
/** for import.meta.env for the rest of the code */
interface ImportMetaEnv {
// NODE_ENV, SITE_URL... included by default
readonly PREVIEW_MODE: boolean;
readonly PLAUSIBLE_SCRIPT_URL?: string;
readonly PLAUSIBLE_DOMAIN?: string;
readonly VERCEL_PROJECT_PRODUCTION_URL?: string;
}
interface ImportMeta {
readonly env: ImportMetaEnv;
}