TypeScript/tests/cases/fourslash/completionPropertyShorthandForObjectLiteral3.ts
chenjigeng d1e1e9dccc
Feat/exclude completions of variable initializers (#42087)
* feat: exclude declared variable when Object literal completions

* feat: check undeclareVariable when completion

* feat: add completion test case

* feat: code optimization

* feat: support shorthand property assignment

* feat: add shorthand property assignment test case

* feat: update completionPropertyShorthandForObjectLiteral test cases

* feat: exclude completions of variable initializers

* feat: update test cases

* feat: add completionListWithoutVariableinitializer test case

* feat: perfect the completionListWithoutVariableinitializer test case

* feat: remove isIdentifier limit

* feat: update test cases

* feat: code optimization and filter out some binding cases

* feat: update test case

* feat: handle arrow function expressions without braces

* feat: add arrow function expressions without braces test case

* feat: check node.parent exist first

* feat: optimization name

* feat: optimize test cases

* chore: code formatting

* feat: perfect type
2021-01-15 15:57:18 -08:00

12 lines
222 B
TypeScript

/// <reference path="fourslash.ts"/>
//// const foo = 1;
//// const bar = 2;
//// const obj = {
//// foo b/*1*/
verify.completions({
marker: ["1"],
exact: completion.globalsPlus(["foo", "bar"]),
});