-
-
Notifications
You must be signed in to change notification settings - Fork 501
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(transformer): use ScopeFlags.is_arrow instead of inside_arro…
…w_function_stack
- Loading branch information
1 parent
0c8733d
commit 727a66d
Showing
6 changed files
with
41 additions
and
81 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
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
15 changes: 15 additions & 0 deletions
15
...l-plugin-transform-arrow-functions/test/fixtures/use-this-inside-blocks-in-arrow/input.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,15 @@ | ||
function outer() { | ||
let f = () => { | ||
{ | ||
let t = this; | ||
} | ||
}; | ||
|
||
let f2 = () => { | ||
if (x) { | ||
if (y) { | ||
return this; | ||
} | ||
} | ||
}; | ||
} |
17 changes: 17 additions & 0 deletions
17
...-plugin-transform-arrow-functions/test/fixtures/use-this-inside-blocks-in-arrow/output.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,17 @@ | ||
function outer() { | ||
var _this = this; | ||
|
||
let f = function() { | ||
{ | ||
let t = _this; | ||
} | ||
}; | ||
|
||
let f2 = function() { | ||
if (x) { | ||
if (y) { | ||
return _this; | ||
} | ||
} | ||
}; | ||
} |