Skip to content

Commit

Permalink
Transpile jsdoc parsing mode (#56627)
Browse files Browse the repository at this point in the history
  • Loading branch information
sheetalkamat committed Dec 1, 2023
1 parent 6edfef8 commit 5bc6617
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.ParseNone,
},
);
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 @@ -11618,6 +11618,7 @@ declare namespace ts {
moduleName?: string;
renamedDependencies?: MapLike<string>;
transformers?: CustomTransformers;
jsDocParsingMode?: JSDocParsingMode;
}
interface TranspileOutput {
outputText: string;
Expand Down

0 comments on commit 5bc6617

Please sign in to comment.