UNPKG

json-schema-typescript-generator

Version:
20 lines 667 B
import { fileGenerator } from './file-generator'; import { idLocations } from './id-locations'; export const generateFileContents = (fileSchemas, options) => { const idFileLocations = idLocations(fileSchemas); const inputInfo = { idFileLocations, options }; const fileContents = new Map(); fileSchemas.forEach((schema, fileLocation) => { const locatedSchema = { fileLocation, schema }; const generated = fileGenerator(locatedSchema, inputInfo); fileContents.set(fileLocation, generated); }); return fileContents; }; //# sourceMappingURL=file-contents-generator.js.map