import * as fs from "fs"; import { type TypeSolutionImplementation } from "./types"; import { SolutionImplementation } from "./SolutionImplementation"; export class SolutionImplementationReader { private readonly solutionImplementations: TypeSolutionImplementation[]; constructor() { const json = fs.readFileSync("solutions.json", "utf-8"); this.solutionImplementations = JSON.parse(json); } public readSolutionUrl(): void { this.solutionImplementations.forEach( (solutionImplementation: TypeSolutionImplementation) => { const s = new SolutionImplementation(solutionImplementation.url); console.log(JSON.stringify(s, null, 2)); } ); } }