Skip to content
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

Do not use strict mode in TS declare #16567

Merged
merged 2 commits into from
Jun 10, 2024
Merged

Conversation

liuxingbaoyu
Copy link
Member

Q                       A
Fixed Issues? Fixes #16542
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature?
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes?
License MIT

I don't know if it would be better to modify packages\babel-parser\src\parser\lval.ts directly, that would be faster and simpler.

@liuxingbaoyu liuxingbaoyu added PR: Spec Compliance 👓 A type of pull request used for our changelog categories pkg: parser area: typescript labels Jun 8, 2024
@babel-bot
Copy link
Collaborator

babel-bot commented Jun 8, 2024

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/57162

) {
let oldStrict;
if (this.state.isAmbientContext && this.state.strict) {
oldStrict = this.state.strict;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
oldStrict = this.state.strict;
oldStrict = true;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or can we change the strictness when entering the ambient context, rather than when checking the identifier?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or can we change the strictness when entering the ambient context, rather than when checking the identifier?

@nicolo-ribaudo nicolo-ribaudo merged commit 8e39f35 into babel:main Jun 10, 2024
51 checks passed
@nicolo-ribaudo nicolo-ribaudo changed the title Not using strict mode in declare Do not use strict mode in TS declare Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: typescript pkg: parser PR: Spec Compliance 👓 A type of pull request used for our changelog categories
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error when parsing eval in .d.ts
4 participants