TypeScript/tests/cases/fourslash/completionListInvalidMemberNames.ts
Andy 36607e1bde Allow quoted names in completions (#18162)
* Allow quoted names in completions

* Don't allow string literal completions if not in an object literal; and use string literals for number keys

* Add TODO
2017-09-06 14:39:53 -07:00

19 lines
670 B
TypeScript

/// <reference path='fourslash.ts' />
////var x = {
//// "foo ": "space in the name",
//// "bar": "valid identifier name",
//// "break": "valid identifier name (matches a keyword)",
//// "any": "valid identifier name (matches a typescript keyword)",
//// "#": "invalid identifier name",
//// "$": "valid identifier name",
//// "\u0062": "valid unicode identifer name (b)",
//// "\u0031\u0062": "invalid unicode identifer name (1b)"
////};
////
////x./*a*/;
////x["/*b*/"];
verify.completionsAt("a", ["bar", "break", "any", "$", "b"]);
verify.completionsAt("b", ["foo ", "bar", "break", "any", "#", "$", "b", "\u0031\u0062"]);