Surfaced by the #10756 census (the source-coverage blind spot), not repaired there: that
card's surface is scripts/check-type-check-coverage.mjs plus the ledger seed, and this
is eight packages' worth of real type errors that need a type annotation each.
The measurement
Each of these directories is in UNCHECKED_SOURCE_DEBT because no tsc program its
package's typecheck script runs reads it. Compiled directly (package's own config,
rootDir neutralised, dependency closure built, on main @ 5886ee6d22):
| directory | errors |
|---|
packages/platform-objects/scripts | 1 |
packages/plugins/plugin-approvals/scripts | 3 |
packages/plugins/plugin-audit/scripts | 3 |
packages/plugins/plugin-security/scripts | 3 |
packages/plugins/plugin-sharing/scripts | 3 |
packages/plugins/plugin-webhooks/scripts | 3 |
packages/services/service-messaging/scripts | 3 |
packages/services/service-realtime/scripts | 3 |
Every one is the same shape, e.g.
packages/plugins/plugin-audit/scripts/i18n-extract.config.ts(24,1): error TS2883: The
inferred type of 'default' cannot be named without a reference to
'../node_modules/@objectstack/spec/dist/view.zod-Vrw2Wzfj.js'. This is likely not
portable. A type annotation is necessary.
with the three referenced symbols being FormFieldInput (view.zod-<hash>),
NavigationItemInput (app.zod-<hash>) and StateNodeConfig
(state-machine.zod-<hash>). platform-objects hits only the StateNodeConfig one.
Why it is worth a card
Two independent things are wrong and either could be the right repair:
- The config files export an un-annotated
default. The immediate fix is a type
annotation on each export, which is what the diagnostic asks for. @objectstack/spec leaks hash-named internal chunks into inferred types. The
names in the diagnostic (view.zod-Vrw2Wzfj.js) are build artefacts whose hashes
change on rebuild, so any consumer inferring a type through them is non-portable by
construction. Note the extension differs across packages (.js for some, .mjs for
others), which is the chunk map, not the consumer.
Repair (2) and (1) may become unnecessary; repair (1) alone leaves the next consumer to
rediscover (2). Worth deciding rather than patching eight files.
Related: #4736 (closed) touched all nine of these configs for a different reason and
records that there are nine repo-wide — the ninth,
packages/services/service-storage/scripts, is not in the table because that package
does not currently reach the census's "covered" scope.
Dedupe
search_issues for the TS2883 wording, i18n-extract, and the spec-dist-chunk shape
returns only closed cards (#4736, #4963, #4570), none of which names this.
Surfaced by the #10756 census (the source-coverage blind spot), not repaired there: that
card's surface is
scripts/check-type-check-coverage.mjsplus the ledger seed, and thisis eight packages' worth of real type errors that need a type annotation each.
The measurement
Each of these directories is in
UNCHECKED_SOURCE_DEBTbecause no tsc program itspackage's
typecheckscript runs reads it. Compiled directly (package's own config,rootDirneutralised, dependency closure built, onmain@5886ee6d22):packages/platform-objects/scriptspackages/plugins/plugin-approvals/scriptspackages/plugins/plugin-audit/scriptspackages/plugins/plugin-security/scriptspackages/plugins/plugin-sharing/scriptspackages/plugins/plugin-webhooks/scriptspackages/services/service-messaging/scriptspackages/services/service-realtime/scriptsEvery one is the same shape, e.g.
with the three referenced symbols being
FormFieldInput(view.zod-<hash>),NavigationItemInput(app.zod-<hash>) andStateNodeConfig(
state-machine.zod-<hash>).platform-objectshits only theStateNodeConfigone.Why it is worth a card
Two independent things are wrong and either could be the right repair:
default. The immediate fix is a typeannotation on each export, which is what the diagnostic asks for.
@objectstack/specleaks hash-named internal chunks into inferred types. Thenames in the diagnostic (
view.zod-Vrw2Wzfj.js) are build artefacts whose hasheschange on rebuild, so any consumer inferring a type through them is non-portable by
construction. Note the extension differs across packages (
.jsfor some,.mjsforothers), which is the chunk map, not the consumer.
Repair (2) and (1) may become unnecessary; repair (1) alone leaves the next consumer to
rediscover (2). Worth deciding rather than patching eight files.
Related: #4736 (closed) touched all nine of these configs for a different reason and
records that there are nine repo-wide — the ninth,
packages/services/service-storage/scripts, is not in the table because that packagedoes not currently reach the census's "covered" scope.
Dedupe
search_issuesfor the TS2883 wording,i18n-extract, and the spec-dist-chunk shapereturns only closed cards (#4736, #4963, #4570), none of which names this.