You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+12-4Lines changed: 12 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
7
7
This project generates alternative TypeScript standard library definitions with improved type safety. The architecture consists of:
8
8
9
9
-**`build/`** - TypeScript build system and generation logic
10
+
10
11
-`lib.ts` - Main script for generating improved lib definitions
11
12
-`package.ts` - Script for building npm packages
12
13
-`diff.ts` - Script for generating documentation diffs
@@ -25,6 +26,7 @@ This project generates alternative TypeScript standard library definitions with
25
26
## Essential Commands
26
27
27
28
### Build Commands
29
+
28
30
```bash
29
31
# Compile TypeScript build scripts
30
32
npm run build:tsc
@@ -40,6 +42,9 @@ npm run build:diff
40
42
```
41
43
42
44
### Testing
45
+
46
+
NOTE that you should run `npm run build:lib` and then `npm run build:package` before running tests to ensure the latest changes are reflected.
47
+
43
48
```bash
44
49
# Run type-level tests in tests/ directory
45
50
cd tests && npm test
@@ -49,10 +54,12 @@ cd tests && npx tsd
49
54
```
50
55
51
56
### Development Workflow
57
+
52
58
1. Modify type definitions in `lib/` directory
53
-
2. Run `npm run build:tsc && npm run build:lib` to regenerate
59
+
2. Run `npm run build:lib && npm run build:generate` to regenerate the output
54
60
3. Test changes with `cd tests && npm test`
55
-
4. Generate packages with `npm run build:package` if needed
61
+
62
+
NOTE that the generated type definitions only take effect during the tests. When you want to debug the generated types, the only way is to write a test case in the `tests/` directory and run `npm test` to see how the types behave. Do not forget to run `npm run build:lib && npm run build:generate` after modifying the source definitions in `lib/`.
56
63
57
64
## Key Implementation Details
58
65
@@ -63,7 +70,8 @@ cd tests && npx tsd
63
70
- All changes prioritize type safety over convenience, potentially causing breaking changes in existing codebases
0 commit comments