From 36fb92be15dd05a8d44b090deb46e7af810ce15a Mon Sep 17 00:00:00 2001 From: Andrew Branch Date: Wed, 2 Mar 2022 09:44:30 -0800 Subject: [PATCH] Add ts.InlayHintsOptions for nightly builds --- src/language/typescript/tsWorker.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/language/typescript/tsWorker.ts b/src/language/typescript/tsWorker.ts index a6f10943..5b71e738 100644 --- a/src/language/typescript/tsWorker.ts +++ b/src/language/typescript/tsWorker.ts @@ -13,6 +13,19 @@ import { } from './monaco.contribution'; import { Uri, worker } from '../../fillers/monaco-editor-core'; +declare module './lib/typescriptServices' { + // Removed in TS 4.7 and merged into UserPreferences + export interface InlayHintsOptions extends ts.UserPreferences { + readonly includeInlayParameterNameHints?: 'none' | 'literals' | 'all'; + readonly includeInlayParameterNameHintsWhenArgumentMatchesName?: boolean; + readonly includeInlayFunctionParameterTypeHints?: boolean; + readonly includeInlayVariableTypeHints?: boolean; + readonly includeInlayPropertyDeclarationTypeHints?: boolean; + readonly includeInlayFunctionLikeReturnTypeHints?: boolean; + readonly includeInlayEnumMemberValueHints?: boolean; + } +} + /** * Loading a default lib as a source file will mess up TS completely. * So our strategy is to hide such a text model from TS.