-
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
Allow 'verbatimModuleSyntax' with transpileModule #53240
Conversation
I feel like the error should only be reported for |
|
Yeah, that second sentence was just me musing. The point was the first sentence. Having both |
Yes, it feels like there's not exactly a ton of "harm" - you can set |
Does anyone have any idea why we're getting all these target=ES3 issues in the tests? |
Probably some unit test default still set to ES3? |
Yep, in the test's if (transpileOptions.compilerOptions.target === undefined) {
transpileOptions.compilerOptions.target = ts.ScriptTarget.ES3;
} That probably should have been changed when we changed the default, or something. Hard to say when some tests surely tested things about ES3 support, but, we're not going to change that. Anyway, probably too late to change this as it'd break cherry-picks. |
I don't understand, why didn't all these tests break before? |
They did, this PR just adds another column to the settings matrix: https://github.com/microsoft/TypeScript/pull/53240/files#diff-15a7ae1852c1cd6c50a9bf7a2453379ef7fce45691dabc656f157272069782b3R94 And then all of the tests below being updated to test that. |
@typescript-bot cherry-pick this to release-5.0 and LKG |
Heya @DanielRosenwasser, I've started to run the task to cherry-pick this into |
"preserveValueImports", | ||
"importsNotUsedAsValues" |
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.
I don't think either of these can actually show up in transpileOptionValueCompilerOptions
because neither explicitly set transpileOptionValue
. But, I guess it's harmless if we want this PR in ASAP.
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.
I added them just to be on the safe side, since it would be fairly easy to miss if we made any changes in compilerOptions.
Hey @DanielRosenwasser, I've opened #53253 for you. |
…rosoft/TypeScript into transpileModule-verbatimModuleSyntax
…e-5.0 (#53253) Co-authored-by: Daniel Rosenwasser <[email protected]> Co-authored-by: typescript-bot <[email protected]>
…to release-5.0 (microsoft#53253) Co-authored-by: Daniel Rosenwasser <[email protected]> Co-authored-by: typescript-bot <[email protected]>
Since
--verbatimModuleSyntax
implies--isolatedModules
, it should be allowed in conjunction withtranspileModule
. However, when both options are specified an error is reported, andtranspileModule
always explicitly setsisolatedModules
with no way to unset the option.This changes
transpileModule
to skip any potential redudndant flags when setting defaults fortranspileModule
.Fixes #53160