We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5635731 commit 9b97dbeCopy full SHA for 9b97dbe
@types/env/index.d.ts
@@ -1,5 +1,9 @@
1
import type { Env } from "src/common"
2
3
+type PickClientVars<T> = {
4
+ [K in keyof T as K extends `CLIENT_${string}` ? K : never]: T[K]
5
+}
6
+
7
declare global {
8
declare var IS_DEV: boolean
9
declare var IS_PROD: boolean
@@ -12,6 +16,6 @@ declare global {
12
16
}
13
17
14
18
interface Window {
15
- env_vars: Partial<Collection<keyof Env, string>>
19
+ env_vars: PickClientVars<Env>
20
21
0 commit comments