Skip to content

Commit

Permalink
Make isDefinition required.
Browse files Browse the repository at this point in the history
For the deprecated getOccurrencesAtPosition, isDefinition is always false.
  • Loading branch information
sandersn committed Jun 14, 2016
1 parent ac9e617 commit 792b23e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/server/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ namespace ts.server {
fileName,
textSpan: ts.createTextSpanFromBounds(start, end),
isWriteAccess: entry.isWriteAccess,
isDefinition: false
};
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/server/protocol.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ declare namespace ts.server.protocol {
/**
* True if reference is a definition, false otherwise.
*/
isDefinition?: boolean;
isDefinition: boolean;
}

/**
Expand Down
5 changes: 3 additions & 2 deletions src/services/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,7 @@ namespace ts {
textSpan: TextSpan;
fileName: string;
isWriteAccess: boolean;
isDefinition?: boolean;
isDefinition: boolean;
}

export interface DocumentHighlights {
Expand Down Expand Up @@ -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
});
}
}
Expand Down

0 comments on commit 792b23e

Please sign in to comment.