feat: Use container for the API service

This commit is contained in:
Lucàs
2024-12-19 11:25:29 +01:00
parent 735ab03d6e
commit 401978a0b4
88 changed files with 865 additions and 3642 deletions
+16
View File
@@ -0,0 +1,16 @@
import { Parser, CsvParser } from "./index";
import { ParserType } from "./index";
class ParserFactory {
/**
* Get the parser corresponding to the dataset type
* @param fileType The type of the dataset
* @returns The parser corresponding to the dataset type
*/
static getParser(fileType: ParserType): Parser {
if (fileType === ParserType.CSV) return CsvParser.instance;
throw new Error("Unsupported file type");
}
}
export default ParserFactory;