diff --git a/src/parser/processor.ts b/src/parser/processor.ts index 76dbf20a..c9b7a8c9 100644 --- a/src/parser/processor.ts +++ b/src/parser/processor.ts @@ -44,20 +44,24 @@ export class Processor { dump() { const { file } = program.opts(); - const result = JSON.stringify(this._result, (key: string, value: string | number) => { - // Changes "type" to be human-readable - if (key === "type" && typeof value === "number") { - const typeNames: string[] = []; - const types = Object.values(CommentType) as number[]; - types.forEach((typeValue) => { - if (value & typeValue) { - typeNames.push(CommentType[typeValue]); - } - }); - return typeNames.join("|"); - } - return value; - }); + const result = JSON.stringify( + this._result, + (key: string, value: string | number) => { + // Changes "type" to be human-readable + if (key === "type" && typeof value === "number") { + const typeNames: string[] = []; + const types = Object.values(CommentType) as number[]; + types.forEach((typeValue) => { + if (value & typeValue) { + typeNames.push(CommentType[typeValue]); + } + }); + return typeNames.join("|"); + } + return value; + }, + 2 + ); if (!file) { console.log(result); } else {