Skip to content

docs: five published READMEs import symbols their packages do not export — 15 TS2305, measured against the built dist #5160

Description

@os-zhuang

Filed unassigned from the implementation of #5138 (shape 2, the snippet compile gate). Not fixed there — that card builds the gate; this is what the gate's adoption survey found in documents it does not yet cover.

What was measured

scripts/check-doc-snippet-types.mjs (landing on claude/issue-5138-doc-snippet-compile-gate) extracts every fenced ts/tsx block and compiles it --strict against each package's built dist/index.d.ts — the surface a consumer imports, not src. Run once with the coverage ledger emptied, over the whole corpus (460 blocks, 57 documents), filtering for TS2305 / TS2724 / TS2614 only — i.e. "imports a name the module does not export", the #5016 / #5048 defect class:

content/docs/guide/objectos-integration.mdx:80 TS2305: Module '"@objectstack/spec"' has no exported member 'AppManifest'.
content/docs/guide/objectos-integration.mdx:330 TS2305: Module '"@object-ui/data-objectstack"' has no exported member 'useObjectQuery'.
content/docs/guide/objectos-integration.mdx:330 TS2305: Module '"@object-ui/data-objectstack"' has no exported member 'useObjectMutation'.
packages/app-shell/README.md:26 TS2305: Module '"@object-ui/app-shell"' has no exported member 'ObjectRenderer'.
packages/app-shell/README.md:43 TS2305: Module '"@object-ui/app-shell"' has no exported member 'DashboardRenderer'.
packages/components/README.md:73 TS2305: Module '"@object-ui/components"' has no exported member 'registerDefaultRenderers'.
packages/components/README.md:84 TS2305: Module '"@object-ui/components"' has no exported member 'registerDefaultRenderers'.
packages/components/README.md:203 TS2305: Module '"@object-ui/react"' has no exported member 'registerRenderer'.
packages/core/README.md:25 TS2305: Module '"@object-ui/core"' has no exported member 'PageSchema'.
packages/core/README.md:26 TS2305: Module '"@object-ui/core"' has no exported member 'FormSchema'.
packages/core/README.md:27 TS2305: Module '"@object-ui/core"' has no exported member 'InputSchema'.
packages/core/README.md:28 TS2305: Module '"@object-ui/core"' has no exported member 'BaseSchema'.
packages/core/README.md:51 TS2305: Module '"@object-ui/core"' has no exported member 'DataScope'.
packages/core/README.md:97 TS2305: Module '"@object-ui/core"' has no exported member 'defineView'.
packages/react/README.md:166 TS2305: Module '"@object-ui/react"' has no exported member 'useRegistry'.

Why this is worth a card rather than a note

Four of the five files are package READMEs, which sit in each package's published files and therefore ship to npm. A reader who copies one of those imports does not get a degraded render — they get a compile error, which is the same shape #5016 (ReportBuilder, registerDrillHandler, ScheduleConfig) and #5048 carried, in four more packages.

Every one of these has been green under every existing gate the whole time. check-doc-component-types reads type literals, check-doc-links reads links, and neither reads an import.

What each entry needs, and why it is not one batch edit

The three dispositions #5053 established apply here too, and they are not interchangeable:

Deciding which, per name, is the work. The name set must come from the package's export surface (the built dist/index.d.ts), never from a grep of src/#5053 measured that ReportScheduleConfig appears twice in src/ and is not exported, so a grep-based check calls it real.

Reproducing

On that branch, with the packages built:

pnpm exec turbo run build $(node scripts/check-doc-snippet-types.mjs --build-filter)
# then, with UNGATED_DOCS emptied, the survey above

All five documents are on the gate's UNGATED_DOCS ledger today, with their measured diagnostic mix as the reason. Fixing a document is what lets its entry be deleted — the ledger can only shrink.

Related

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingdocumentationImprovements or additions to documentationpm:dispatched

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions