Skip to content

chore: generate declarations with tsgo (TypeScript 7 native compiler)#4

Closed
aojunhao123 wants to merge 2 commits into
fix/non-virtual-scroll-offsetfrom
chore/ts7-dts
Closed

chore: generate declarations with tsgo (TypeScript 7 native compiler)#4
aojunhao123 wants to merge 2 commits into
fix/non-virtual-scroll-offsetfrom
chore/ts7-dts

Conversation

@aojunhao123

Copy link
Copy Markdown
Owner

What

Generate .d.ts with the tsgo (TypeScript 7 native) compiler via dts.compiler: 'tsgo'.

Why

father's default dts path runs its own bundled typescript@5.4.2, independent of the project's compiler. Under this project's (non-strict) tsconfig, 5.4.2 fails to narrow the ListyScrollToConfig union in VirtualList scrollTo, so pnpm compile breaks even though the editor / tsc (6.x) is happy. tsgo runs the TS7 native compiler, which narrows correctly and emits declarations roughly 10x faster.

Notes

  • @typescript/native-preview is the compiler tsgo resolves; the project's typescript@6 is major < 7 and is skipped by father's resolver.
  • tsgo enforces rootDir strictly, and father hands it the full tsconfig file list (including tests/**), which trips TS6059. tsconfig.build.json scopes the build to src/ and is wired in through FATHER_TSCONFIG_NAME; the main tsconfig (editor / jest) is untouched.
  • @typescript/native-preview is a preview build — treat this as opt-in until father ships stable TS7 support.

🤖 Generated with Claude Code

@github-actions

Copy link
Copy Markdown

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit c6035d6.

@aojunhao123

Copy link
Copy Markdown
Owner Author

Superseded by upstream react-component#60 (this one had the wrong base branch).

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