-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Closed
Copy link
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 issue
Description
💻
- Would you like to work on a fix?
How are you using Babel?
Other (Next.js, Gatsby, vue-cli, ...)
Input code
const x = 0; x = 0;Configuration file name
No response
Configuration
{
"plugins": [
[
"@babel/plugin-transform-block-scoping",
{
"tdz": true
}
]
]
}Current and expected behavior
Validation function of const variables (_readOnlyError) is never called when tdz option is enabled:
// output.js
"use strict";
function _readOnlyError(name) { throw new TypeError("\"" + name + "\" is read-only"); }
var x = 0;
x;
x = 0;Environment
npm version 8.19.2
@babel/[email protected]
@babel/[email protected]
@babel/[email protected]
node version 18.11.0
macos version 13.0
Possible solution
No response
Additional context
No response
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 issue