diff --git a/src/server/protocol.ts b/src/server/protocol.ts index cabe7dcd55d..ac4d5a9bf0c 100644 --- a/src/server/protocol.ts +++ b/src/server/protocol.ts @@ -2086,6 +2086,11 @@ namespace ts.server.protocol { * Then either that enum/class or a namespace containing it will be the recommended symbol. */ isRecommended?: true; + /** + * If true, this completion was generated from traversing the name table of an unchecked JS file, + * and therefore may not be accurate. + */ + isUncheckedCompletion?: true; } /** diff --git a/src/services/completions.ts b/src/services/completions.ts index 471d8e4c142..b97dabfb32f 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -310,7 +310,8 @@ namespace ts.Completions { name: realName, kind: ScriptElementKind.warning, kindModifiers: "", - sortText: SortText.JavascriptIdentifiers + sortText: SortText.JavascriptIdentifiers, + isUncheckedCompletion: true }); } }); diff --git a/src/services/types.ts b/src/services/types.ts index 3a1627c247f..82a90afa12c 100644 --- a/src/services/types.ts +++ b/src/services/types.ts @@ -988,6 +988,7 @@ namespace ts { hasAction?: true; source?: string; isRecommended?: true; + isUncheckedCompletion?: true; } export interface CompletionEntryDetails {