import * as fs from "fs-extra"; import { InsightError } from "../controller/IInsightFacade"; export default class QueryPersister { constructor() {} public async persistQuery(dir: string): Promise { try { return await fs.readJson(dir); } catch (_e) { throw new InsightError(`persistQuery: dataset doesn't exist`); } } }