diff --git a/src/services/transpile.ts b/src/services/transpile.ts index 9637387afa093..0b708e6282635 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.ParseNone, }, ); if (transpileOptions.moduleName) { diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index b051e45f6081a..a55b003f6c8db 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -11618,6 +11618,7 @@ declare namespace ts { moduleName?: string; renamedDependencies?: MapLike; transformers?: CustomTransformers; + jsDocParsingMode?: JSDocParsingMode; } interface TranspileOutput { outputText: string;