Skip to content

Published v12 declarations fail strict consumer type-checking #291

Description

@bcomnes

Problem

The published 12.0.0-beta.2 tarball does not type-check in a clean NodeNext consumer with skipLibCheck: false.
The failure reproduces under TypeScript 5.9 and TypeScript 6.0.

DOMStack-owned declaration errors include:

lib/build-pages/page-builders/html/index.d.ts: Cannot find name 'T'
lib/build-pages/page-builders/md/index.d.ts: Cannot find name 'T'

The generated htmlBuilder and mdBuilder return types reference T without declaring it.
The public declaration graph also exposes declaration errors from cpx2, and TypeScript 5.9 reports an additional Markdown declaration incompatibility.

The repository's skipLibCheck: true setting masks these failures in the current suite.

Proposed fix

  • Correct or remove the leaked concrete-builder generic.
  • Avoid exposing implementation-only dependency types through the public declaration graph where practical.
  • Add a release test that runs npm pack, installs the tarball in a clean fixture, and runs tsc with NodeNext resolution and skipLibCheck: false.

Acceptance criteria

  • Root imports from @domstack/static compile in a clean consumer.
  • Public type imports from @domstack/static/types.js compile in a clean consumer.
  • The packed artifact is tested rather than only the source checkout.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtypes

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions