Skip to content

Commit b90a56d

Browse files
author
Andy
authored
Mark getOccurrences as deprecated in protocol.ts like it is in services/types.ts (#22067)
1 parent 8463b1e commit b90a56d

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/server/protocol.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ namespace ts.server.protocol {
5050
NavtoFull = "navto-full",
5151
NavTree = "navtree",
5252
NavTreeFull = "navtree-full",
53+
/** @deprecated */
5354
Occurrences = "occurrences",
5455
DocumentHighlights = "documentHighlights",
5556
/* @internal */
@@ -829,6 +830,7 @@ namespace ts.server.protocol {
829830
}
830831

831832
/**
833+
* @deprecated
832834
* Get occurrences request; value of command field is
833835
* "occurrences". Return response giving spans that are relevant
834836
* in the file at a given line and column.
@@ -837,6 +839,7 @@ namespace ts.server.protocol {
837839
command: CommandTypes.Occurrences;
838840
}
839841

842+
/** @deprecated */
840843
export interface OccurrencesResponseItem extends FileSpan {
841844
/**
842845
* True if the occurrence is a write location, false otherwise.
@@ -849,6 +852,7 @@ namespace ts.server.protocol {
849852
isInString?: true;
850853
}
851854

855+
/** @deprecated */
852856
export interface OccurrencesResponse extends Response {
853857
body?: OccurrencesResponseItem[];
854858
}

tests/baselines/reference/api/tsserverlibrary.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5058,6 +5058,7 @@ declare namespace ts.server.protocol {
50585058
Navto = "navto",
50595059
NavTree = "navtree",
50605060
NavTreeFull = "navtree-full",
5061+
/** @deprecated */
50615062
Occurrences = "occurrences",
50625063
DocumentHighlights = "documentHighlights",
50635064
Open = "open",
@@ -5658,13 +5659,15 @@ declare namespace ts.server.protocol {
56585659
openingBrace: string;
56595660
}
56605661
/**
5662+
* @deprecated
56615663
* Get occurrences request; value of command field is
56625664
* "occurrences". Return response giving spans that are relevant
56635665
* in the file at a given line and column.
56645666
*/
56655667
interface OccurrencesRequest extends FileLocationRequest {
56665668
command: CommandTypes.Occurrences;
56675669
}
5670+
/** @deprecated */
56685671
interface OccurrencesResponseItem extends FileSpan {
56695672
/**
56705673
* True if the occurrence is a write location, false otherwise.
@@ -5675,6 +5678,7 @@ declare namespace ts.server.protocol {
56755678
*/
56765679
isInString?: true;
56775680
}
5681+
/** @deprecated */
56785682
interface OccurrencesResponse extends Response {
56795683
body?: OccurrencesResponseItem[];
56805684
}

0 commit comments

Comments
 (0)