Skip to content

Commit

Permalink
🤖 Pick PR #56627 (Transpile jsdoc parsing mode) into release-5.3 (#56629
Browse files Browse the repository at this point in the history
)

Co-authored-by: Sheetal Nandi <[email protected]>
Co-authored-by: Daniel Rosenwasser <[email protected]>
  • Loading branch information
3 people authored Dec 2, 2023
1 parent ba3d2b0 commit 4c2afa7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/services/transpile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export interface TranspileOptions {
moduleName?: string;
renamedDependencies?: MapLike<string>;
transformers?: CustomTransformers;
jsDocParsingMode?: JSDocParsingMode;
}

export interface TranspileOutput {
Expand Down Expand Up @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions tests/baselines/reference/api/typescript.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11614,6 +11614,7 @@ declare namespace ts {
moduleName?: string;
renamedDependencies?: MapLike<string>;
transformers?: CustomTransformers;
jsDocParsingMode?: JSDocParsingMode;
}
interface TranspileOutput {
outputText: string;
Expand Down

0 comments on commit 4c2afa7

Please sign in to comment.