-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[[FIX]] Allow initializing const bindings to undef
Warning W080 is inappropriate for constant bindings because, unlike `var` and `let` declarations, `const` requires an initializer. Relax the emission of W080 to allow initializing constant bindings with `undefined`. Add unit tests to verify that the warning continues to be emitted for constant bindings declared in ES2015 destructuring patterns.
- Loading branch information
1 parent
e7071e0
commit fedaf6f
Showing
2 changed files
with
9 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
.if ( ! isConst && значение . идентификатор && значение . значение === "undefined" )