From b90a56dc7a2d526488bec0cae0a86a171ce1b405 Mon Sep 17 00:00:00 2001 From: Andy Date: Thu, 22 Feb 2018 13:21:40 -0800 Subject: [PATCH] Mark getOccurrences as deprecated in protocol.ts like it is in services/types.ts (#22067) --- src/server/protocol.ts | 4 ++++ tests/baselines/reference/api/tsserverlibrary.d.ts | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/server/protocol.ts b/src/server/protocol.ts index fbff4501133..76d954ebe23 100644 --- a/src/server/protocol.ts +++ b/src/server/protocol.ts @@ -50,6 +50,7 @@ namespace ts.server.protocol { NavtoFull = "navto-full", NavTree = "navtree", NavTreeFull = "navtree-full", + /** @deprecated */ Occurrences = "occurrences", DocumentHighlights = "documentHighlights", /* @internal */ @@ -829,6 +830,7 @@ namespace ts.server.protocol { } /** + * @deprecated * Get occurrences request; value of command field is * "occurrences". Return response giving spans that are relevant * in the file at a given line and column. @@ -837,6 +839,7 @@ namespace ts.server.protocol { command: CommandTypes.Occurrences; } + /** @deprecated */ export interface OccurrencesResponseItem extends FileSpan { /** * True if the occurrence is a write location, false otherwise. @@ -849,6 +852,7 @@ namespace ts.server.protocol { isInString?: true; } + /** @deprecated */ export interface OccurrencesResponse extends Response { body?: OccurrencesResponseItem[]; } diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index 249569a8d22..ee3bd07d280 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -5058,6 +5058,7 @@ declare namespace ts.server.protocol { Navto = "navto", NavTree = "navtree", NavTreeFull = "navtree-full", + /** @deprecated */ Occurrences = "occurrences", DocumentHighlights = "documentHighlights", Open = "open", @@ -5658,6 +5659,7 @@ declare namespace ts.server.protocol { openingBrace: string; } /** + * @deprecated * Get occurrences request; value of command field is * "occurrences". Return response giving spans that are relevant * in the file at a given line and column. @@ -5665,6 +5667,7 @@ declare namespace ts.server.protocol { interface OccurrencesRequest extends FileLocationRequest { command: CommandTypes.Occurrences; } + /** @deprecated */ interface OccurrencesResponseItem extends FileSpan { /** * True if the occurrence is a write location, false otherwise. @@ -5675,6 +5678,7 @@ declare namespace ts.server.protocol { */ isInString?: true; } + /** @deprecated */ interface OccurrencesResponse extends Response { body?: OccurrencesResponseItem[]; }