diff --git a/extensions/package.json b/extensions/package.json index 32f5bc84b98..b0bac44993d 100644 --- a/extensions/package.json +++ b/extensions/package.json @@ -4,7 +4,7 @@ "license": "MIT", "description": "Dependencies shared by all extensions", "dependencies": { - "typescript": "^5.2.0-dev.20230731" + "typescript": "^5.2.0-dev.20230807" }, "scripts": { "postinstall": "node ./postinstall.mjs" diff --git a/extensions/typescript-language-features/src/languageFeatures/inlayHints.ts b/extensions/typescript-language-features/src/languageFeatures/inlayHints.ts index fb08f68dc42..5363619579b 100644 --- a/extensions/typescript-language-features/src/languageFeatures/inlayHints.ts +++ b/extensions/typescript-language-features/src/languageFeatures/inlayHints.ts @@ -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; + } } diff --git a/extensions/yarn.lock b/extensions/yarn.lock index 5b00e9e5431..815d839a79a 100644 --- a/extensions/yarn.lock +++ b/extensions/yarn.lock @@ -228,10 +228,10 @@ to-regex-range@^5.0.1: dependencies: is-number "^7.0.0" -typescript@^5.2.0-dev.20230731: - version "5.2.0-dev.20230731" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.0-dev.20230731.tgz#a72083c07043568ab856dd8ca0d8f3a708c3e3a6" - integrity sha512-RJVLgnDgu67ZrohYy0aBea+5TICfRod36+24zw0bR/KJDQJO9mlIjTC0k+/PKw87fXP5JuUHqepEk15PvFya7A== +typescript@^5.2.0-dev.20230807: + version "5.2.0-dev.20230807" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.0-dev.20230807.tgz#652fa8a3fcc46958035d9b911c815299deb9f58e" + integrity sha512-sF8sZl3r/mpAdKAxASaWaoU+mNPF3g8OrZ601HraU2l4WEwAf6nO7sq0Bzl+Y3FV7sWjy+gb6kdM1CtLjVne/g== vscode-grammar-updater@^1.1.0: version "1.1.0" diff --git a/package.json b/package.json index 011eee0ce1f..5cbce3c0e96 100644 --- a/package.json +++ b/package.json @@ -212,7 +212,7 @@ "ts-loader": "^9.4.2", "ts-node": "^10.9.1", "tsec": "0.2.7", - "typescript": "^5.2.0-dev.20230731", + "typescript": "^5.2.0-dev.20230807", "typescript-formatter": "7.1.0", "underscore": "^1.12.1", "util": "^0.12.4", diff --git a/yarn.lock b/yarn.lock index e264840ade2..451a8cbd0b6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10075,10 +10075,10 @@ typescript@^4.7.4: resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.4.tgz#c464abca159669597be5f96b8943500b238e60e6" integrity sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ== -typescript@^5.2.0-dev.20230731: - version "5.2.0-dev.20230731" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.0-dev.20230731.tgz#a72083c07043568ab856dd8ca0d8f3a708c3e3a6" - integrity sha512-RJVLgnDgu67ZrohYy0aBea+5TICfRod36+24zw0bR/KJDQJO9mlIjTC0k+/PKw87fXP5JuUHqepEk15PvFya7A== +typescript@^5.2.0-dev.20230807: + version "5.2.0-dev.20230807" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.0-dev.20230807.tgz#652fa8a3fcc46958035d9b911c815299deb9f58e" + integrity sha512-sF8sZl3r/mpAdKAxASaWaoU+mNPF3g8OrZ601HraU2l4WEwAf6nO7sq0Bzl+Y3FV7sWjy+gb6kdM1CtLjVne/g== typical@^4.0.0: version "4.0.0"