Updating bundled and build TS versions (#189868)

This commit is contained in:
Matt Bierner
2023-08-07 17:04:12 -07:00
committed by GitHub
parent a138e61f7a
commit 4f66a0c2c1
5 changed files with 20 additions and 19 deletions

View File

@@ -87,17 +87,18 @@ class TypeScriptInlayHintsProvider extends Disposable implements vscode.InlayHin
}
private convertInlayHintText(resource: vscode.Uri, tsHint: Proto.InlayHintItem): string | vscode.InlayHintLabelPart[] {
if (typeof tsHint.text === 'string') {
return tsHint.text;
if (tsHint.displayParts) {
return tsHint.displayParts.map((part): vscode.InlayHintLabelPart => {
const out = new vscode.InlayHintLabelPart(part.text);
if (part.span) {
out.location = Location.fromTextSpan(resource, part.span);
}
return out;
});
}
return tsHint.text.map((part): vscode.InlayHintLabelPart => {
const out = new vscode.InlayHintLabelPart(part.text);
if (part.span) {
out.location = Location.fromTextSpan(resource, part.span);
}
return out;
});
return tsHint.text;
}
}