Skip to content

feat(dts-generator): migrate to TypeScript 7.1 Beta - #671

Draft
akudev wants to merge 1 commit into
mainfrom
typescript-7-dts-generator
Draft

akudev wants to merge 1 commit into
mainfrom
typescript-7-dts-generator

Conversation

@akudev

@akudev akudev commented Oct 22, 2026

Copy link
Copy Markdown
Member

Migrate dts-generator's checkCompile subsystem from the TS 5/6 compiler API to TypeScript 7.1's new Go-based API.

Changes:

  • Use new API() / api.createProgram() from typescript/sync with using (Disposable) for automatic process cleanup
  • Adapt diagnostic analysis to TS 7.1's plain-data Diagnostic type: diagnostic.fileName, diagnostic.text, diagnostic.startPosition, diagnostic.messageChain replace the old SourceFile-based accessors
  • Read source files from disk with caching for error context extraction (replaces diagnostic.file.getFullText() etc.)
  • Import enums from their new locations (typescript/sync, typescript/ast)
  • Replace ts.BuildOptions with RawCompilerOptions
  • Add minimumReleaseAgeExclude for typescript in pnpm-workspace.yaml

Performance: checkCompile runs ~4x faster (0.7s vs 2.6-3.2s). All 6 OpenUI5 snapshot tests pass. 0 compilation errors.

Migrate dts-generator's checkCompile subsystem from the TS 5/6 compiler
API to TypeScript 7.1's new Go-based API.

Changes:
- Use `new API()` / `api.createProgram()` from `typescript/sync` with
  `using` (Disposable) for automatic process cleanup
- Adapt diagnostic analysis to TS 7.1's plain-data Diagnostic type:
  `diagnostic.fileName`, `diagnostic.text`, `diagnostic.startPosition`,
  `diagnostic.messageChain` replace the old SourceFile-based accessors
- Read source files from disk with caching for error context extraction
  (replaces `diagnostic.file.getFullText()` etc.)
- Import enums from their new locations (`typescript/sync`,
  `typescript/ast`)
- Replace `ts.BuildOptions` with `RawCompilerOptions`
- Add `minimumReleaseAgeExclude` for typescript in pnpm-workspace.yaml

Performance: checkCompile runs ~4x faster (0.7s vs 2.6-3.2s).
All 6 OpenUI5 snapshot tests pass. 0 compilation errors.
@akudev
akudev marked this pull request as draft October 22, 2026 14:38

This branch has not been deployed

No deployments
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