Assigns global properties when defining a function that has a function type argument with default value and rest parameters #10911
Labels
i: bug
i: duplicate
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
Bug Report
Current Behavior
This bug occurrs when transpile TypeScript codes.
ReferenceError: _len is not defined
because the assignment of a global variable is not allowed with"use strict";
.BUGGY_ARGUMENT
toDIFFERENT_ARGUMENT
Input Code
Expected behavior/code
Babel Configuration (babel.config.js, .babelrc, package.json#babel, cli command, .eslintrc)
.babelrc
Environment
cli
Possible Solution
Additional context/Screenshots
Add any other context about the problem here. If applicable, add screenshots to help explain.
This also occurs on online playground like the following
https://babeljs.io/repl#?browsers=&build=&builtIns=false&spec=false&loose=false&code_lz=MYewdgzgLgBAZgVzMGBeGAKAUDGEQC2ApgGJLABcmAQgKoDi9AmgPoCCASvbQLICiAOQAqVMAgIAjIgCcA2gF0AlGgB8MCSBAAbIgEMwaTMtRq4urRCIAaHDAB0D6UWgAFXdN3EoMiKPFS5eSxjNQBvW1BIWDpGVk5ufmFDfGIyZAwnV3dPIm9pCEUAbgjwfB07LRAAcwwY5nYuXkEhIqwAX2KsRHSMEJgoaQQiVqA&debug=false&forceAllTransforms=false&shippedProposals=false&circleciRepo=&evaluate=false&fileSize=false&timeTravel=false&sourceType=module&lineWrap=true&presets=es2015%2Creact%2Cstage-2%2Ctypescript&prettier=false&targets=&version=7.7.7&externalPlugins=
The text was updated successfully, but these errors were encountered: