mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-16 07:13:45 -05:00
Add test for find references
This commit is contained in:
@@ -301,7 +301,7 @@ module ts.server {
|
||||
return {
|
||||
fileName: entry.file,
|
||||
textSpan: ts.createTextSpanFromBounds(start, end),
|
||||
isWriteAccess: false,
|
||||
isWriteAccess: entry.isWriteAccess,
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
@@ -409,6 +409,7 @@ module ts.server {
|
||||
start: start,
|
||||
lineText: lineText,
|
||||
end: compilerService.host.positionToLineCol(ref.fileName, ts.textSpanEnd(ref.textSpan)),
|
||||
isWriteAccess: ref.isWriteAccess
|
||||
};
|
||||
}).sort(compareFileStart);
|
||||
return {
|
||||
|
||||
3
src/server/protodef.d.ts
vendored
3
src/server/protodef.d.ts
vendored
@@ -127,6 +127,9 @@ declare module ServerProtocol {
|
||||
loaded the referencing files).
|
||||
*/
|
||||
lineText: string;
|
||||
|
||||
/** True if reference is a write location, false otherwise. */
|
||||
isWriteAccess: boolean;
|
||||
}
|
||||
|
||||
/** The body of a "references" response message. */
|
||||
|
||||
Reference in New Issue
Block a user