mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-19 20:37:00 -05:00
Support a 'recommended' completion entry (#20020)
* Support a 'recommended' completion entry * Code review * Restore duplicate comments
This commit is contained in:
@@ -1701,8 +1701,9 @@ namespace ts.server.protocol {
|
||||
*/
|
||||
sortText: string;
|
||||
/**
|
||||
* An optional span that indicates the text to be replaced by this completion item. If present,
|
||||
* this span should be used instead of the default one.
|
||||
* An optional span that indicates the text to be replaced by this completion item.
|
||||
* If present, this span should be used instead of the default one.
|
||||
* It will be set if the required span differs from the one generated by the default replacement behavior.
|
||||
*/
|
||||
replacementSpan?: TextSpan;
|
||||
/**
|
||||
@@ -1714,6 +1715,12 @@ namespace ts.server.protocol {
|
||||
* Identifier (not necessarily human-readable) identifying where this completion came from.
|
||||
*/
|
||||
source?: string;
|
||||
/**
|
||||
* If true, this completion should be highlighted as recommended. There will only be one of these.
|
||||
* This will be set when we know the user should write an expression with a certain type and that type is an enum or constructable class.
|
||||
* Then either that enum/class or a namespace containing it will be the recommended symbol.
|
||||
*/
|
||||
isRecommended?: true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user