Commit 5aa7901
committed
fix: correct global type augmentation for ImportMeta.env
- Remove duplicate environment.d.ts file, consolidate into env.d.ts
- Add proper declare global wrapper with export {} for module context
- Define ImportMetaEnv interface with documented Klever SDK env vars
- Use triple-slash reference in index.ts to include global augmentation
- Add eslint-disable comment for required triple-slash reference usage
- Keep sideEffects: false to allow proper tree-shaking
This fixes the esbuild warning about ignored bare imports while ensuring
TypeScript correctly picks up the global ImportMeta.env types across
all packages. The global augmentation now properly extends ImportMeta
with optional env property containing Klever-specific environment variables.
Fixes build warning: "Ignoring this import because src/types/env.d.ts was marked as having no side effects"1 parent 77ac25f commit 5aa7901
File tree
3 files changed
+37
-25
lines changed- packages/connect-core/src/types
3 files changed
+37
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
2 | 8 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
8 | 22 | | |
9 | | - | |
10 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
11 | 33 | | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
6 | 9 | | |
7 | 10 | | |
8 | 11 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
0 commit comments