Incompatible with Typescript 4.8+
See original GitHub issueTypescript 4.8 has is in Beta/RC and will be fully live soon, and 4.9 is in active dev.
I tried to use @deepkit/type
in projects where I’m using Typescript 4.8.1-rc, and found that tsc
fails. After experiments, I found that:
- For a single file that has only the content
type a = string;
:- ✅ Typescript 4.7.4: Works as expected
- ✅ Typescript 4.8.1-rc.1: Works as expected
- ✅ Typescript 4.9.0-dev.20220819: Works as expected
- Once that type is exported (changing the file content to
export type a = string;
):- ✅ Typescript 4.7.4: Works as expected
- ❌ Typescript 4.8.1-rc.1:
Error: Debug Failure. Unhandled SyntaxKind: 273.
- ❌ Typescript 4.9.0-dev.20220819:
Error: Debug Failure. Unhandled SyntaxKind: 273.
- Confirmed that the above are true when using either
npm
orpnpm
I got the full error stack, but I can’t see anything of any obvious value.
The command: $ NODE_OPTIONS='--stack-trace-limit=10000' node.exe node_modules/typescript/lib/tsc.js
The stack trace:
node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:98429
throw e;
^
Error: Debug Failure. Unhandled SyntaxKind: 273.
at pipelineEmitWithHintWorker (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:93024:22)
at pipelineEmitWithHint (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:92590:17)
at pipelineEmitWithSourceMaps (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:96207:13)
at pipelineEmitWithComments (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:95912:13)
at pipelineEmit (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:92534:13)
at emitExpression (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:92518:13)
at emitExportDeclaration (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:94407:17)
at pipelineEmitWithHintWorker (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:92791:32)
at pipelineEmitWithHint (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:92590:17)
at pipelineEmitWithSourceMaps (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:96207:13)
at pipelineEmitWithComments (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:95912:13)
at pipelineEmit (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:92534:13)
at emit (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:92507:13)
at emitListItemWithParenthesizerRule (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:96337:9)
at emitNodeListItems (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:95275:17)
at emitNodeList (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:95213:17)
at emitList (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:95179:13)
at emitSourceFileWorker (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:94880:13)
at emitBodyWithDetachedComments (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:96018:17)
at emitSourceFile (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:94799:17)
at pipelineEmitWithHintWorker (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:92604:24)
at pipelineEmitWithHint (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:92590:17)
at noEmitNotification (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:91202:9)
at onEmitNode (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:79299:13)
at onEmitNode (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:80396:13)
at onEmitNode (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:89325:17)
at onEmitNode (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:89392:24)
at emitNodeWithNotification (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:91324:21)
at pipelineEmitWithNotification (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:92579:13)
at pipelineEmit (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:92534:13)
at print (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:92470:13)
at Object.writeFile (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:92454:13)
at printSourceFileOrBundle (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:91961:25)
at emitJsFileOrBundle (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:91874:13)
at emitSourceFileOrBundle (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:91802:13)
at forEachEmittedFile (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:91560:34)
at Object.emitFiles (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:91783:9)
at emitWorker (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:98355:33)
at node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:98340:72
at runWithCancellationToken (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:98423:24)
at Object.emit (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:98340:26)
at emitFilesAndReportErrors (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:103453:23)
at Object.emitFilesAndReportErrorsAndGetExitStatus (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:103476:18)
at performCompilation (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:106628:29)
at executeCommandLineWorker (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:106512:17)
at Object.executeCommandLine (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:106557:20)
at Object.<anonymous> (node_modules\.pnpm\typescript@4.8.1-rc\node_modules\typescript\lib\tsc.js:106852:4)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
at node:internal/main/run_main_module:17:47
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:11 (7 by maintainers)
Top Results From Across the Web
Prisma Client is incompatible with TypeScript 4.8 · Issue #15041
When trying to build prisma-using project with TS 4.8, following errors are thrown: node_modules/.prisma/client/index.d.ts:1144:45 - error ...
Read more >The Definitive TypeScript 4.8 Guide - SitePen
Our TypeScript style guide is regularly updated to provide new information ... to number”) since the two types are known to be incompatible....
Read more >Documentation - Type Compatibility - TypeScript
Enums are compatible with numbers, and numbers are compatible with enums. Enum values from different enum types are considered incompatible. For example,.
Read more >Announcing TypeScript 4.8 - Microsoft Developer Blogs
Announcing TypeScript 4.8 · Improved Intersection Reduction, Union Compatibility, and Narrowing · Improved Inference for infer Types in Template ...
Read more >@typescript-eslint/eslint-plugin-tslint | Yarn - Package Manager
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is fixed in master and will be released soon
they could, but that would increase the maintainability costs enormously with almost no advantage. Supporting very early the newest TypeScript version has almost no advantage for Deepkit, especially when it means older TypeScript version can not be used anymore. The smallest user group is the one that switched to a completely new TS version within the first few weeks.
Unfortunately TypeScript v4.8 had really dirty breaking changes so I hope this was an outliner in terms of how long it took to support it.