Skip to content

Commit ec1b83f

Browse files
chore(Common): Update TypeScript config for declaration emission
Modified the `tsconfig.json` in the `Common` element to optimize TypeScript declaration file generation for shared DTOs and interfaces. Key changes: 1. Added `composite: true` to enable project references, allowing other Land components (`Cocoon`, `Wind`) to build against `Common`'s type definitions 2. Enabled `declarationMap: true` to provide source mapping for generated `.d.ts` files, improving developer experience when navigating shared types 3. Set `emitDeclarationOnly: true` since `Common` contains only type definitions (abstract traits and DTOs) without runtime JS code 4. Specified `rootDir: '.'` to ensure declaration files maintain correct relative paths This aligns with Land's architecture where `Common` serves as the central type library defining gRPC contracts and effect interfaces used across Rust (`Mountain`) and TypeScript (`Cocoon`/`Wind`) components. The changes ensure type safety during cross-component development while eliminating unnecessary JS output for this pure-type crate.
1 parent 7a11cf5 commit ec1b83f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tsconfig.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,18 @@
22
"compilerOptions": {
33
"baseUrl": "./",
44

5+
"composite": true,
6+
7+
"declarationMap": true,
8+
9+
"emitDeclarationOnly": true,
10+
511
"lib": ["ESNext"],
612

713
"outDir": "Target",
814

15+
"rootDir": ".",
16+
917
"types": ["@cloudflare/workers-types/experimental", "@types/node"]
1018
},
1119

0 commit comments

Comments
 (0)