From 68d356eed91731cd0c13eb946f296aa90ef4d5ac Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 6 Dec 2023 18:49:34 -0500 Subject: feat: TypeScript 5.3 (#21480) https://github.com/denoland/TypeScript/pull/9 --- cli/tsc/99_main_compiler.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'cli/tsc/99_main_compiler.js') diff --git a/cli/tsc/99_main_compiler.js b/cli/tsc/99_main_compiler.js index 3f67ccb24..8f76425c1 100644 --- a/cli/tsc/99_main_compiler.js +++ b/cli/tsc/99_main_compiler.js @@ -226,6 +226,8 @@ delete Object.prototype.__proto__; impliedNodeFormat: isCjsCache.has(fileName) ? ts.ModuleKind.CommonJS : ts.ModuleKind.ESNext, + // in the lsp we want to be able to show documentation + jsDocParsingMode: ts.JSDocParsingMode.ParseAll, }, version, true, @@ -537,11 +539,12 @@ delete Object.prototype.__proto__; _onError, _shouldCreateNewSourceFile, ) { - const createOptions = getCreateSourceFileOptions(languageVersion); if (logDebug) { debug( `host.getSourceFile("${specifier}", ${ - ts.ScriptTarget[createOptions.languageVersion] + ts.ScriptTarget[ + getCreateSourceFileOptions(languageVersion).languageVersion + ] })`, ); } @@ -568,10 +571,12 @@ delete Object.prototype.__proto__; specifier, data, { - ...createOptions, + ...getCreateSourceFileOptions(languageVersion), impliedNodeFormat: isCjsCache.has(specifier) ? ts.ModuleKind.CommonJS : ts.ModuleKind.ESNext, + // no need to parse docs for `deno check` + jsDocParsingMode: ts.JSDocParsingMode.ParseForTypeErrors, }, false, scriptKind, -- cgit v1.2.3