OptionaldataOptionalfilterA string that should be used when filtering a set of completion items.
OptionalhasIndicates whether commiting this completion entry will require additional code actions to be made to avoid errors. The CompletionEntryDetails will have these actions.
OptionalinsertText 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.
OptionalisIf true, this completion was generated from traversing the name table of an unchecked JS file, and therefore may not be accurate.
OptionalisIf 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.
OptionalisIf 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.
OptionalisIf 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.
OptionalisinsertText should be interpreted as a snippet if true.
OptionalkindOptionallabelAdditional details for the label.
OptionalreplacementAn 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.
A string that is used for comparing completion items so that they can be ordered. This is often the same as the name but may be different in certain circumstances.
OptionalsourceIdentifier (not necessarily human-readable) identifying where this completion came from.
OptionalsourceHuman-readable description of the source.
OptionalsymbolFor API purposes.
Included for non-string completions only when includeSymbol: true option is passed to getCompletionsAtPosition.
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 isunknownin 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.