mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-11 06:02:53 -05:00
Make isDefinition required.
For the deprecated getOccurrencesAtPosition, isDefinition is always false.
This commit is contained in:
@@ -537,6 +537,7 @@ namespace ts.server {
|
||||
fileName,
|
||||
textSpan: ts.createTextSpanFromBounds(start, end),
|
||||
isWriteAccess: entry.isWriteAccess,
|
||||
isDefinition: false
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
2
src/server/protocol.d.ts
vendored
2
src/server/protocol.d.ts
vendored
@@ -308,7 +308,7 @@ declare namespace ts.server.protocol {
|
||||
/**
|
||||
* True if reference is a definition, false otherwise.
|
||||
*/
|
||||
isDefinition?: boolean;
|
||||
isDefinition: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1208,7 +1208,7 @@ namespace ts {
|
||||
textSpan: TextSpan;
|
||||
fileName: string;
|
||||
isWriteAccess: boolean;
|
||||
isDefinition?: boolean;
|
||||
isDefinition: boolean;
|
||||
}
|
||||
|
||||
export interface DocumentHighlights {
|
||||
@@ -5750,7 +5750,8 @@ namespace ts {
|
||||
result.push({
|
||||
fileName: entry.fileName,
|
||||
textSpan: highlightSpan.textSpan,
|
||||
isWriteAccess: highlightSpan.kind === HighlightSpanKind.writtenReference
|
||||
isWriteAccess: highlightSpan.kind === HighlightSpanKind.writtenReference,
|
||||
isDefinition: false
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user