-
-
Notifications
You must be signed in to change notification settings - Fork 431
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
Add support for using keyword (TypeScript 5.2) #1628
Comments
What's causing this issue? It seems that TS 5.2 is already supported and tested (#1633), so how come |
Suspect this may be a tsconfig.json issue. No change should be required to ts-loader |
You may be right, for some reason {
"compilerOptions": {
"target": "es2022",
"lib": ["es2022", "esnext.disposable", "dom"]
}
} Seen at the bottom of the section https://devblogs.microsoft.com/typescript/announcing-typescript-5-2/#using-declarations-and-explicit-resource-management My config is based on @sindresorhus/tsconfig.json. |
The error is between the chair and the monitor. 😅 The syntax is: using tempFile = await createTempFile(content.value); not await using tempFile = await createTempFile(content.value); I think ts-loader is working correctly here. 👍 |
The syntax is correct when you are using
And it works as expected when I compile it with esbuild. But Webpack with ts-loader keeps failing with an error:
|
Hm, I could make it work with no error after I changed |
Does this new keyword collide with my favorite undocumented RxJS function |
TypeScript has introduced a new keyword
using
in 5.2 release. Seems like ts-loader does not support it. I get the following error:Could you please add support for this new keyword?
The text was updated successfully, but these errors were encountered: