-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Labels
outdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issuepkg: traverse
Description
Issue originally made by @spicyj
Options
function transform(src) { console.log(require('./packages/babel-core').transform(src, {plugins: [[require('./packages/babel-plugin-transform-es2015-block-scoping'), {tdz: true}]]}).code); }
Input code
> transform('function f() {x;} maybeCall(f); let x = 5;')
function f() {
(function () {
throw new ReferenceError("x is not defined - temporal dead zone");
})();
}maybeCall(f);var x = 5;
Description
f should only throw if maybeCall calls f before the let executes.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
outdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issuepkg: traverse