File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -89,8 +89,8 @@ async function emitDom() {
8989
9090 const overriddenItems = await readInputJSON ( "overridingTypes.jsonc" ) ;
9191 const addedItems = await readInputJSON ( "addedTypes.jsonc" ) ;
92- const patches = await readPatches ( "patches" ) ;
93- const removals = await readPatches ( "removals" ) ;
92+ const patches = await readPatches ( ) ;
93+ const removals = await readPatches ( true ) ;
9494 const comments = await readInputJSON ( "comments.json" ) ;
9595 const documentationFromMDN = await generateDescriptions ( ) ;
9696 const removedItems = await readInputJSON ( "removedTypes.jsonc" ) ;
Original file line number Diff line number Diff line change @@ -428,15 +428,15 @@ function removeNamesDeep(obj: unknown): unknown {
428428 * Read, parse, and merge all KDL files under the input folder.
429429 */
430430export default async function readPatches (
431- folder : "patches" | "removals" ,
431+ isRemovals ?: boolean ,
432432) : Promise < any > {
433433 const patchDirectory = new URL ( "../../inputfiles/patches/" , import . meta. url ) ;
434434 const fileUrls = await getAllFileURLs ( patchDirectory ) ;
435435
436436 const parsedContents = await Promise . all ( fileUrls . map ( readPatch ) ) ;
437437 const res = parsedContents . reduce ( ( acc , current ) => merge ( acc , current ) , { } ) ;
438438 const { removals, ...withoutRemovals } = res ;
439- if ( folder == "removals" ) {
439+ if ( isRemovals ) {
440440 return removeNamesDeep ( removals ) ;
441441 }
442442 return withoutRemovals ;
You can’t perform that action at this time.
0 commit comments