-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
When verbatimModuleSyntax: true, allow an explicit isolatedModules: true #53601
Comments
I sure hope somebody picks up that phone, because I called it! |
While we are waiting for the fix to be applied to v5.0.4 and released, is there a workaround to get this working? Is the only option to set |
… that broke when it is set to true. See details here on PR that should fix in next release 5.0.4: microsoft/TypeScript#53611 When 5.0.4 comes out, need to flip isolatedModules back to true Here is details on the issue: microsoft/TypeScript#53601
@GitMurf The workaround is to not have |
@fatcerberus thanks for the quick response! So you mean just remove (or comment out) the isolateModules from the tsconfig all together? And effectively then I will have the same settings via the verbatimModuleSyntax? |
@GitMurf Yes. Behavior under |
@fatcerberus How did you know it's a superset? (this is sincerely asking as I'm beginner) I came from the docs: https://www.typescriptlang.org/docs/handbook/modules/guides/choosing-compiler-options.html#im-using-a-bundler. |
Bug Report
The new
verbatimModuleSyntax
impliesisolatedModules
, which is fine. However, it also prevents us from specifyingisolatedModules: true
explicitly, which should also be fine.This is an issue in a Next.js app because its build process will force "isolatedModules: true" to be present. This issue has been reported on their side as well.
So it is currently impossible to upgrade a Next.js app to TypeScript 5.
Existing bug reports
This issue was not taken into consideration:
#53374
#53160
🕗 Version & Regression Information
TypeScript 5.0
🙁 Actual behavior
Type error: Option 'isolatedModules' is redundant and cannot be specified with option 'verbatimModuleSyntax'.
🙂 Expected behavior
verbatimModuleSyntax: true
should allowisolatedModules: true
.The text was updated successfully, but these errors were encountered: