Skip to content

Commit 99f7ed7

Browse files
chore: wip
1 parent 0c93c65 commit 99f7ed7

File tree

3 files changed

+706
-6
lines changed

3 files changed

+706
-6
lines changed

TODO.md

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050

5151
### P1: Parser Efficiency
5252

53-
- [ ] **Avoid double-parsing** - `parser.ts` and `extractor.ts` both parse similar constructs. Consolidate into a single AST-based approach.
53+
- [x] **Avoid double-parsing** - ✅ Already resolved. `parser.ts` is deprecated (only re-exports for backward compatibility). All parsing now uses TypeScript AST via `extractor/cache.ts` with `createSourceFile`.
5454

5555
- [x] **Lazy comment extraction** - `extractJSDocComments()` is called even when `keepComments=false`. Short-circuit early. ✅ Already implemented
5656

@@ -261,17 +261,26 @@
261261
262262
- [x] **Add missing test for example 0012** - Test file exists but not in test array. ✅ Already included
263263
264-
- [ ] **Add `checker.ts` test** - Large file excluded from tests, should have coverage.
264+
- [x] **Add `checker.ts` test** - ✅ Added `test/checker.test.ts` with 34 tests (Session 8).
265265
266266
- [x] **Property-based testing** - ✅ Added `test/fuzzing.test.ts` with 25 tests:
267267
- Random declaration generators (functions, interfaces, types, classes, enums)
268268
- Malformed input resilience tests (unclosed braces, invalid syntax)
269269
- Stress tests (many declarations, deep nesting)
270270
- Performance characteristics tests
271271
272-
- [ ] **Snapshot testing** - Add snapshot tests for complex type transformations.
272+
- [x] **Snapshot testing** - ✅ Added `test/snapshots.test.ts` (24 tests):
273+
- Generic types (complex constraints, recursive, multiple constraints)
274+
- Conditional types (nested, distributive, infer)
275+
- Mapped types (modifiers, key remapping)
276+
- Template literal types
277+
- Function overloads
278+
- Class patterns (abstract, decorators, multiple interfaces)
279+
- Module patterns (namespaces, module augmentation)
280+
- Utility type patterns (Pick, Partial, Omit, Exclude)
281+
- Edge cases (deeply nested, large unions, index signatures, const assertions, callable types)
273282
274-
- [ ] **Error case testing** - Test malformed input handling.
283+
- [x] **Error case testing** - Test malformed input handling covered in `test/errors.test.ts` (52 tests).
275284
276285
- [ ] **Performance regression tests** - Add benchmarks to CI.
277286
@@ -694,7 +703,7 @@ Based on test fixtures analysis:
694703
- Edge cases (Unicode, null bytes, BOM, mixed line endings)
695704
- Complex declarations (abstract class, const enum, namespace, module)
696705
697-
- [ ] **Edge case coverage** - `edge-cases.ts` fixture exists but verify all cases pass.
706+
- [x] **Edge case coverage** - ✅ Verified. `test/edge-cases.test.ts` (27 tests) + fixture test in `dts.test.ts` all pass.
698707
699708
- [x] **Plugin tests** - No tests for bun-plugin or vite-plugin. ✅ Added `test/plugins.test.ts` with 22 tests
700709
@@ -1460,6 +1469,21 @@ Based on test fixtures analysis:
14601469
14611470
**Total tests: 520** (up from 481)
14621471
1472+
#### Latest Features (November 27, 2025 - Session 16)
1473+
1474+
- **Snapshot Testing** - `test/snapshots.test.ts` (NEW, 24 tests):
1475+
- Complex generic types with constraints and recursion
1476+
- Conditional types (nested, distributive, infer)
1477+
- Mapped types with modifiers and key remapping
1478+
- Template literal types with union expansion
1479+
- Function overloads
1480+
- Class patterns (abstract, decorators, multiple interfaces)
1481+
- Module patterns (namespaces, module augmentation)
1482+
- Utility type patterns (Pick, Partial, Omit, Exclude)
1483+
- Edge cases (deeply nested, large unions, index signatures, callable types)
1484+
1485+
**Total tests: 544** (up from 520)
1486+
14631487
---
14641488
14651489
*Last updated: November 27, 2025*

packages/dtsx/.test-cli/docs-test/api-docs/API.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# API Documentation
22

3-
> Generated on 2025-11-27T13:09:10.736Z
3+
> Generated on 2025-11-27T13:22:23.230Z
44
55
## Table of Contents
66

0 commit comments

Comments
 (0)