Make isDefinition required.

For the deprecated getOccurrencesAtPosition, isDefinition is always false.
This commit is contained in:
Nathan Shively-Sanders 2016-06-14 08:48:26 -07:00
parent ac9e617e5e
commit 792b23edc2
3 changed files with 5 additions and 3 deletions

View file

@ -537,6 +537,7 @@ namespace ts.server {
fileName,
textSpan: ts.createTextSpanFromBounds(start, end),
isWriteAccess: entry.isWriteAccess,
isDefinition: false
};
});
}

View file

@ -308,7 +308,7 @@ declare namespace ts.server.protocol {
/**
* True if reference is a definition, false otherwise.
*/
isDefinition?: boolean;
isDefinition: boolean;
}
/**

View file

@ -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
});
}
}