TypeScript/tests/cases/compiler/inferredNonidentifierTypesGetQuotes.ts
Wesley Wigham b8e0009c9b
Set syntheticLiteralTypeOrigin on synthetic undefined-type members (#22216)
* Have getNameOfSymbolAsWritten quote nonidentifier nonnumeric symbols all the time

* Revert checker changes

* Reuse synthetic origin to indicate that derived declaration name may need to be quoted
2018-02-28 16:03:05 -08:00

4 lines
97 B
TypeScript

// @declaration: true
var x = [{ "a-b": "string" }, {}];
var y = [{ ["a-b"]: "string" }, {}];