-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
Labels
claimedoutdatedA 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: parser
Description
Bug Report
Current Behavior
Does not throw errors
Input Code
Bug
var obj = {
foo = 123, // no error
bar: x = 123
};Works fine
var obj = {
foo = 123 // SyntaxError: Unexpected token
};Expected behavior/code
Should throw errors.
Chrome
SyntaxError: Invalid shorthand property initializer
TypeScript
error TS1312: '=' can only be used in an object literal property inside a destructuring assignment.
Environment
Babel version(s): 7.5.5
Node/npm version: Node 11.13 / npm 6.7
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
claimedoutdatedA 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: parser