Skip to content

fix: add transitive @types deps for raw .ts consumers#76

Closed
enitrat wants to merge 1 commit intoevmts:mainfrom
enitrat:fix/ship-compiled-output
Closed

fix: add transitive @types deps for raw .ts consumers#76
enitrat wants to merge 1 commit intoevmts:mainfrom
enitrat:fix/ship-compiled-output

Conversation

@enitrat
Copy link

@enitrat enitrat commented Feb 13, 2026

Summary

  • Moves @types/react-reconciler from devDependencies to dependencies
  • Adds @types/react-dom to dependencies
  • Adds a README note about skipLibCheck: true for consumers

Problem

Smithers ships raw TypeScript source (all exports point to ./src/*.ts files). When consumers type-check their project, TypeScript processes Smithers' source and encounters missing type declarations:

node_modules/smithers-orchestrator/src/components.ts(2,38): error TS7016:
  Could not find a declaration file for module 'react-dom/server'.
node_modules/smithers-orchestrator/src/dom/renderer.ts(1,24): error TS7016:
  Could not find a declaration file for module 'react-reconciler'.

skipLibCheck: true only skips .d.ts files — it has no effect on .ts files in node_modules. Moving the @types/* packages to dependencies ensures they're installed transitively.

This is a minimal fix. A more complete solution would be to ship compiled .js + .d.ts output so skipLibCheck works as expected.

Test plan

  • bun install succeeds
  • bun run typecheck passes
  • Consumer project no longer sees TS7016 errors from Smithers' internals
  • @types/react-dom and @types/react-reconciler are present in consumer's node_modules after installing Smithers

Since the package ships raw TypeScript source (all exports point to
./src/*.ts), consumers see type errors from Smithers' internal imports
of react-dom/server and react-reconciler. skipLibCheck only skips .d.ts
files, not .ts files in node_modules.

Move @types/react-reconciler to dependencies and add @types/react-dom
so they're installed transitively for consumers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant