-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Omit trailing comma in object literal properties #271
Copy link
Copy link
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue
Milestone
Description
Object literal with trailing commas, e.g.:
var x = {
a: 1,
b:2,
}emit the comma in the generated js:
var x = {
a: 1,
b:2,
}This is invalid ES3, and will break in CScript for instance:
cscript d:\test.js
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
d:\test.js(4, 1) Microsoft JScript compilation error: Expected identifier, string or number
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issue