-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Align app shared types with API models and silence TS deprecation warning #497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -19,6 +19,7 @@ | |||||
| "noUnusedLocals": true, | ||||||
| "noUnusedParameters": true, | ||||||
| "noFallthroughCasesInSwitch": true, | ||||||
| "ignoreDeprecations": "6.0", | ||||||
|
||||||
| "ignoreDeprecations": "6.0", | |
| "ignoreDeprecations": "5.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
TypeScript 5.6 ignoreDeprecations "6.0" supported values and baseUrl deprecation
💡 Result:
In TypeScript 5.6 and later (up to 6.0 as of 2026-04-19), the ignoreDeprecations compiler option silences warnings for deprecated features introduced in specific versions. The supported values are version strings like "5.0", "6.0", corresponding to deprecation phases (e.g., "ignoreDeprecations": "6.0" silences deprecations from TypeScript 6.0). baseUrl is deprecated in TypeScript 6.0 (error TS5101) and will be removed in 7.0. It previously prefixed paths mappings and served as a fallback resolution base, but now paths must explicitly include prefixes (e.g., change "@app/": ["app/"] with "baseUrl": "./src" to "@app/": ["./src/app/"]). Use "ignoreDeprecations": "6.0" temporarily to suppress the warning while migrating. A codemod tool ts5to6 assists with baseUrl and rootDir fixes. TypeScript 5.6 itself (released ~2024) does not introduce ignoreDeprecations or deprecate baseUrl; these are TypeScript 6.0 changes (beta ~Feb 2026, stable ~Mar 2026). No deprecations specific to 5.6 relate to these.
Citations:
- 1: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-6-0.html
- 2: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-5-0.html
- 3: https://www.techzine.eu/news/devops/138778/typescript-6-0-beta-announced-its-last-javascript-based-release/
- 4: Deprecate baseUrl microsoft/TypeScript#62509
- 5: Deprecate baseUrl microsoft/TypeScript#62432
- 6: Deprecate, remove support for
baseUrlmicrosoft/TypeScript#62207 - 7: Flag Deprecation Plan microsoft/TypeScript#51000
- 8: TypeScript 6.0 Iteration Plan microsoft/TypeScript#63085
- 9: 6.0 Deprecation List microsoft/TypeScript#54500
- 10: 6.0 Migration Guide microsoft/TypeScript#62508
- 11: 6.0 Migration Guide microsoft/TypeScript#62508
🏁 Script executed:
cat -n app/tsconfig.jsonRepository: jamiepine/voicebox
Length of output: 1051
LGTM — ignoreDeprecations: "6.0" is the correct escape hatch for the baseUrl 6.0 deprecation in TS 6.0.
Just a heads-up: this suppresses all 6.0-slated deprecations project-wide, not only baseUrl. Consider a follow-up to drop baseUrl (paths work without it under "moduleResolution": "bundler") so this flag can be removed before the TS 6.0 upgrade.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@app/tsconfig.json` at line 22, The tsconfig currently sets
"ignoreDeprecations": "6.0" which suppresses all TS 6.0 deprecation warnings
(not just baseUrl); to prepare for removing this escape hatch, remove the
project-wide ignore by deleting or reverting "ignoreDeprecations": "6.0" and
instead update the tsconfig to eliminate the deprecated baseUrl usage (replace
path resolution by relying on "moduleResolution": "bundler" with your existing
"paths" configuration), then run a full typecheck to confirm no remaining
references to baseUrl so the ignore flag can be safely removed before upgrading
to TypeScript 6.0.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The header comment says these aliases are kept in sync with the generated API contract types, but
@/lib/api/typesis a hand-maintained file (it even lacks the generated-code header used elsewhere undersrc/lib/api/). Consider rewording this to “canonical API contract types” (or pointing at the actual generated module if that’s what’s intended) to avoid misleading future maintainers.