Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Scope hoisting destructuring (#3084)
- Loading branch information
1 parent
47d91b6
commit a66e8b2
Showing
8 changed files
with
73 additions
and
7 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
.../integration-tests/test/integration/scope-hoisting/commonjs/wrap-destructuring-array/a.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(function(){ | ||
output = require('./b'); | ||
})(); |
4 changes: 4 additions & 0 deletions
4
.../integration-tests/test/integration/scope-hoisting/commonjs/wrap-destructuring-array/b.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
const x = [1, 2] | ||
const [a, b] = x; | ||
|
||
module.exports = [a, b]; |
4 changes: 4 additions & 0 deletions
4
...tion-tests/test/integration/scope-hoisting/commonjs/wrap-destructuring-array/package.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"private": true, | ||
"browserslist": ["node 8"] | ||
} |
3 changes: 3 additions & 0 deletions
3
...integration-tests/test/integration/scope-hoisting/commonjs/wrap-destructuring-object/a.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
(function(){ | ||
output = require('./b'); | ||
})(); |
7 changes: 7 additions & 0 deletions
7
...integration-tests/test/integration/scope-hoisting/commonjs/wrap-destructuring-object/b.js
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const x = { | ||
a: 4, | ||
b: 2 | ||
} | ||
const {a, b} = x; | ||
|
||
module.exports = [a, b]; |
4 changes: 4 additions & 0 deletions
4
...ion-tests/test/integration/scope-hoisting/commonjs/wrap-destructuring-object/package.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"private": true, | ||
"browserslist": ["node 8"] | ||
} |
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