FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Do not use strict mode in TS `declare` by liuxingbaoyu · Pull Request #16567 · babel/babel · GitHub

/ babel Public

Do not use strict mode in TS declare - #16567

Merged
nicolo-ribaudo merged 2 commits into
babel:mainfrom
liuxingbaoyu:dts-eval
Jun 10, 2024
Merged

nicolo-ribaudo merged 2 commits into
babel:mainfrom
liuxingbaoyu:dts-eval

Conversation

Copy link
Copy Markdown
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 added PR: Spec Compliance 👓 A type of pull request used for our changelog categories pkg: parser area: typescript labels Jun 8, 2024

babel-bot commented Jun 8, 2024
edited
Loading

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
Suggested change
oldStrict = this.state.strict;
oldStrict = true;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

nicolo-ribaudo merged commit 8e39f35 into babel:main Jun 10, 2024
nicolo-ribaudo changed the title Not using strict mode in declare Do not use strict mode in TS declare Jun 10, 2024
github-actions Bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Sep 10, 2024
github-actions Bot locked as resolved and limited conversation to collaborators Sep 10, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area: typescript outdated A closed issue/PR that is archived due to age. Recommended to make a new issue 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


Back | FazBrowse Home | New Git URL