Skip to content

Commit d2ea782

Browse files
committed
remove redundant type casts
1 parent 128232a commit d2ea782

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/command/render/pandoc.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ export async function runPandoc(
449449

450450
// generate defaults and capture defaults to be printed
451451
let allDefaults = (await generateDefaults(options)) || {};
452-
let printAllDefaults = safeCloneDeep(allDefaults) as FormatPandoc;
452+
let printAllDefaults = safeCloneDeep(allDefaults);
453453

454454
// capture any filterParams in the FormatExtras
455455
const formatFilterParams = {} as Record<string, unknown>;
@@ -1689,7 +1689,7 @@ function runPandocMessage(
16891689

16901690
const keys = Object.keys(metadata);
16911691
if (keys.length > 0) {
1692-
const printMetadata = safeCloneDeep(metadata) as Metadata;
1692+
const printMetadata = safeCloneDeep(metadata);
16931693
delete printMetadata.format;
16941694

16951695
// print message

src/command/render/render-contexts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ export async function renderContexts(
216216
// we make it optional because some of the callers have
217217
// actually just cloned it themselves and don't need to preserve
218218
// the original
219-
options = safeCloneDeep(options) as RenderOptions;
219+
options = safeCloneDeep(options);
220220
}
221221

222222
const { engine, target } = await fileExecutionEngineAndTarget(

src/render/notebook/notebook-contributor-html.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function resolveHtmlNotebook(
8484
executedFile: ExecutedFile,
8585
notebookMetadata?: NotebookMetadata,
8686
) {
87-
const resolved = safeCloneDeep(executedFile) as ExecutedFile;
87+
const resolved = safeCloneDeep(executedFile);
8888

8989
// Set the output file
9090
resolved.recipe.format.pandoc[kOutputFile] = `${outputFile(nbAbsPath)}`;

0 commit comments

Comments
 (0)