Run these from the script-types package root.
Use this when creating or rebuilding the augment corpus from existing legacy types.
- Extract augment candidates from legacy types:
npm run sync:extract-augments- Generate fresh types from HTML and clean redundant augment entries:
npm run sync:html -- --prune-augments- Stop here in the normal case.
That is the standard bootstrap flow.
What each step does:
sync:extract-augments- compares current legacy/generated
.d.tsfiles against HTML-derived models - creates repo-tracked augment JSON files in
src/augments/daz
- compares current legacy/generated
sync:html -- --prune-augments- generates
.d.tsfiles fromHTML + augments - then removes redundant augment members that are already inherited in the final generated type graph
- generates
This is optional, not required.
npm run sync:htmlUse it only if you want one more clean emit after prune changed the augment JSON files, or if you manually edited augments afterward.
In most cases, the bootstrap flow is enough:
sync:extract-augmentssync:html -- --prune-augments
After augments already exist, the normal flow is simpler:
npm run sync:htmlOr, if you also want redundant augment cleanup in the same run:
npm run sync:html -- --prune-augmentsIf the strict bootstrap missed a valid undocumented member, recover it after checking real consumer code.
Typical flow:
- compile real consumer projects
- inspect failures
- use the error-recovery helper or edit augment JSON manually
- run
sync:htmlagain
Helper command:
npm run sync:recover-errors -- path\\to\\tsc-errors.txtTransient generated HTML models:
.generated/html-models
Repo-tracked augment files:
src/augments/daz
Generated declarations:
src/types
Bootstrap-only command that compares legacy declarations against transient HTML models and creates augment JSON.
npm run sync:extract-augmentsSingle type:
npm run sync:extract-augments -- --type DzWidgetBehavior:
- parses current legacy/generated
.d.tsfiles - parses HTML docs and writes transient models to
.generated/html-models - compares legacy members against HTML members and HTML ancestry
- writes augment JSON files to
src/augments/daz
npm run sync:htmlSingle type:
npm run sync:html -- --type DzWidgetSync and prune redundant augment members afterward:
npm run sync:html -- --prune-augmentsSingle type with prune:
npm run sync:html -- --type DzAssetIOFilter --prune-augmentsParameters:
--type <ClassName|file>limits the run to a single type--prune-augmentsruns the augment cleanup pass after emitting types
Behavior:
- parses HTML docs
- writes transient HTML JSON models to
.generated/html-models - loads augments from
src/augments/daz - emits final
.d.tsfiles - optionally prunes redundant augment members from augment JSON after generation
Standalone cleanup pass for augment JSON.
npm run sync:prune-augmentsSingle type:
npm run sync:prune-augments -- --type DzAssetIOFilterBehavior:
- reads final generated
.d.tsfiles fromsrc/types - uses transient HTML models from
.generated/html-modelsas ancestry fallback when generated class files are missing - builds ancestry from final generated declarations plus HTML fallback
- removes redundant augment members from
src/augments/daz
npm run sync:recover-errors -- path\\to\\tsc-errors.txtBehavior:
- reads error log text
- finds
Property 'X' does not exist on type 'Y'patterns - prints candidate augment references for manual review
- Normal sync is HTML-first. The current generated
.d.tsfiles are not used as live recovery input. --prune-augmentsdefaults to off.- The prune pass is post-generation on purpose, so it can use the final generated ancestry graph.
- Same-name undocumented overloads intentionally kept as augments may still require manual review.