REFACTOR: create builder for parser reporterand fix pdf

This commit is contained in:
marcos-silva-rodrigues
2025-04-29 15:18:46 -03:00
parent 04accb6689
commit 36997403e1
9 changed files with 129 additions and 76 deletions
+3 -3
View File
@@ -1,11 +1,11 @@
import { stringify } from 'csv'
import { Parser } from './parser.interface';
export class CsvParser<T> {
export class CsvParser<T> implements Parser<T>{
async parse(data: T[]) {
return new Promise((resolve, reject) => {
return new Promise<string>((resolve, reject) => {
stringify(data, { header: true }, function (err, output) {
if (err) reject(err);
console.log(output)
resolve(output)
});