@@ -172,3 +172,34 @@ derive(items, () => _v1());
172172
173173With these changes in place the closure transformer is significantly more
174174predictable, and we have a solid foundation for the remaining roadmap items.
175+
176+ ## Appendix
177+
178+ ### Code & Fixture References
179+
180+ - ` packages/ts-transformers/src/closures/transformer.ts ` : hierarchical capture
181+ tree and map callback rewriting logic.
182+ - ` packages/ts-transformers/src/utils/capture-tree.ts ` : rebuilds access
183+ expressions (including optional chaining) based on the original AST.
184+ - ` packages/ts-transformers/src/utils/identifiers.ts ` : shared identifier
185+ normalisation helpers.
186+ - ` packages/ts-transformers/src/transformers/builtins/derive.ts ` : derives share
187+ the same capture/alias strategy as map closures.
188+
189+ Representative fixtures documenting the new behaviour:
190+
191+ - Map closures:
192+ ` packages/ts-transformers/test/fixtures/closures/map-outer-element.* ` ,
193+ ` map-computed-alias-side-effect.* ` , ` map-destructured-numeric-alias.* ` .
194+ - Derive transformer:
195+ ` packages/ts-transformers/test/fixtures/ast-transform/ternary_derive.* ` and
196+ unit test ` test/derive/create-derive-call.test.ts ` .
197+ - Optional chaining:
198+ ` packages/ts-transformers/test/fixtures/jsx-expressions/optional-chain-captures.* ` .
199+
200+ ### Test Commands
201+
202+ - ` deno task test ` (from ` packages/ts-transformers/ ` ) – runs unit and fixture
203+ suites covering closures, derive, and opaque-ref transforms.
204+ - ` deno lint ` / ` deno fmt ` – keep transformer and fixture files consistent (lint
205+ excludes expected fixtures by default).
0 commit comments