Upgrade TypeScript to 7.0.2 (native Go compiler)

TypeScript 7 ships as a native Go binary and drastically trims the
package's public JS API surface (no more `main`, and `exports['.']`
now only resolves to lib/version.cjs) since the programmatic compiler
API isn't stable again until 7.1. This broke apps/resolver's tsdown
build, which used rolldown-plugin-dts' tsc-program mode (import ts
from 'typescript'; ts.createProgram(...)) for declaration generation.

Fix by switching that build to isolatedDeclarations, which lets
rolldown-plugin-dts generate .d.ts via its oxc-based path instead of
the TS compiler API entirely. That surfaced two isolatedDeclarations
violations in ontime-types (array/Object.keys initializers lacking
explicit annotations), fixed with explicit `string[]` types matching
their existing inferred type. Also bumped tsdown to pick up its latest
rolldown-plugin-dts, and disabled allowJs in tsconfig.dts.json since
it's incompatible with isolatedDeclarations.

Full workspace typecheck, lint, build, and test suite (1186 tests)
pass under TypeScript 7.0.2.
This commit is contained in:
Claude
2026-07-08 22:15:40 +00:00
committed by Carlos Valente
parent f12d3ca59c
commit 949ab2b7dc
6 changed files with 702 additions and 246 deletions
+1 -1
View File
@@ -20,7 +20,7 @@
"license": "AGPL-3.0-only", "license": "AGPL-3.0-only",
"devDependencies": { "devDependencies": {
"ontime-types": "workspace:^4.2.1", "ontime-types": "workspace:^4.2.1",
"tsdown": "^0.21.5", "tsdown": "^0.22.4",
"typescript": "catalog:" "typescript": "catalog:"
}, },
"files": [ "files": [
+3 -1
View File
@@ -1,6 +1,8 @@
{ {
"extends": "./tsconfig.json", "extends": "./tsconfig.json",
"compilerOptions": { "compilerOptions": {
"ignoreDeprecations": "6.0" "ignoreDeprecations": "6.0",
"isolatedDeclarations": true,
"allowJs": false
} }
} }
@@ -83,7 +83,7 @@ export type OntimeActionKey =
| OntimeMessageSet | OntimeMessageSet
| OntimeMessageSecondary; | OntimeMessageSecondary;
export const ontimeActionKeyValues = [ export const ontimeActionKeyValues: string[] = [
...ontimeAuxTriggerAction, ...ontimeAuxTriggerAction,
...ontimePlaybackAction, ...ontimePlaybackAction,
...ontimeAuxSetAction, ...ontimeAuxSetAction,
@@ -12,4 +12,4 @@ export enum TimerLifeCycle {
export type TimerLifeCycleKey = keyof typeof TimerLifeCycle; export type TimerLifeCycleKey = keyof typeof TimerLifeCycle;
export const timerLifecycleValues = Object.keys(TimerLifeCycle); export const timerLifecycleValues: string[] = Object.keys(TimerLifeCycle);
+695 -241
View File
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -6,7 +6,7 @@ catalog:
'@types/node': 22.19.11 '@types/node': 22.19.11
rimraf: 6.0.1 rimraf: 6.0.1
ts-essentials: 10.1.1 ts-essentials: 10.1.1
typescript: 6.0.2 typescript: 7.0.2
vitest: 4.0.17 vitest: 4.0.17
allowBuilds: allowBuilds: