Thanks to visit codestin.com
Credit goes to github.com

Skip to content

add basic guards support#14838

Closed
vankop wants to merge 1 commit into
mainfrom
guards
Closed

add basic guards support#14838
vankop wants to merge 1 commit into
mainfrom
guards

Conversation

@vankop

@vankop vankop commented Nov 26, 2021

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

feature

Did you add tests for your changes?

partial

Does this PR introduce a breaking change?

no

What needs to be documented once your changes are merged?

nothing

@webpack-bot

Copy link
Copy Markdown
Contributor

For maintainers only:

  • This needs to be documented (issue in webpack/webpack.js.org will be filed when merged)
  • This needs to be backported to webpack 4 (issue will be created when merged)

settings.name,
expr.range,
exportPresenceMode,
parser.inGuard(settings)

@vankop vankop Nov 26, 2021

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

should we provide guards list in dependency? for cases like

import {notHere, bNotHere} from 'a' 

if (notHere) {bNotHere();} // no warn for b

function add() { counter++; }

it("should not add additional warnings/errors", () => {
if (b) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

only identifier in evaluate supports for now

@vankop

vankop commented Mar 9, 2022

Copy link
Copy Markdown
Contributor Author

closing in favor #15497

@vankop vankop closed this Mar 9, 2022
@vankop vankop deleted the guards branch March 9, 2022 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants