diff --git a/src/services/transpile.ts b/src/services/transpile.ts index 9637387afa093..a15b48d8d7436 100644 --- a/src/services/transpile.ts +++ b/src/services/transpile.ts @@ -36,6 +36,7 @@ export interface TranspileOptions { moduleName?: string; renamedDependencies?: MapLike; transformers?: CustomTransformers; + jsDocParsingMode?: JSDocParsingMode; } export interface TranspileOutput { @@ -121,7 +122,7 @@ export function transpileModule(input: string, transpileOptions: TranspileOption languageVersion: getEmitScriptTarget(options), impliedNodeFormat: getImpliedNodeFormatForFile(toPath(inputFileName, "", compilerHost.getCanonicalFileName), /*packageJsonInfoCache*/ undefined, compilerHost, options), setExternalModuleIndicator: getSetExternalModuleIndicator(options), - jsDocParsingMode: JSDocParsingMode.ParseNone, + jsDocParsingMode: transpileOptions.jsDocParsingMode ?? JSDocParsingMode.ParseAll, }, ); if (transpileOptions.moduleName) { diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 986c17630bfe2..754fc50cdd483 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -11614,6 +11614,7 @@ declare namespace ts { moduleName?: string; renamedDependencies?: MapLike; transformers?: CustomTransformers; + jsDocParsingMode?: JSDocParsingMode; } interface TranspileOutput { outputText: string;