CompletionEntry
Properties
If this completion entry is selected, typing a commit character will cause the entry to be accepted.
A property to be sent back to TS Server in the CompletionDetailsRequest, along with name
, that allows TS Server to look up the symbol represented by the completion item, disambiguating items with the same name. Currently only defined for auto-import completions, but the type is unknown
in the protocol, so it can be changed as needed to support other kinds of completions. The presence of this property should generally not be used to assume that this completion entry is an auto-import.
A string that should be used when filtering a set of completion items.
Text to insert instead of name
. This is used to support bracketed completions; If name
might be "a-b" but insertText
would be ["a-b"]
, coupled with replacementSpan
to replace a dotted access with a bracket access.
If true, this completion was generated from traversing the name table of an unchecked JS file, and therefore may not be accurate.
If true, this completion was an auto-import-style completion of an import statement (i.e., the module specifier was inserted along with the imported identifier). Used for telemetry reporting.
If true, this completion was for an auto-import of a module not yet in the program, but listed in the project package.json. Used for telemetry reporting.
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.
Additional details for the label.
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.
Human-readable description of the source
.