* Add kindModifier to mark if a completion item is for an optional field For #12458 Adds a new KindModifier for completion items to mark when a property is optional. This can be used by editors to either change the item icon or add a `?` to the item text * Add method test * Baseline-accept
10 lines
407 B
TypeScript
10 lines
407 B
TypeScript
/// <reference path="fourslash.ts" />
|
|
|
|
////interface A { a?: number; method?(): number; };
|
|
////function f(x: A) {
|
|
////x./*a*/;
|
|
////}
|
|
|
|
goTo.marker("a");
|
|
verify.completionListContains("a", /* text */ undefined, /* documentation */ undefined, { kindModifiers: "optional" });
|
|
verify.completionListContains("method", /* text */ undefined, /* documentation */ undefined, { kindModifiers: "optional" });
|