import { DataWithPosition } from "data-with-position" ; import { ComposedNarrativeSchema } from "narrative-schema-common" ; import { VFile } from "vfile" ; import { compose } from "./compose" ; import { load } from "./load" ; export const loadAndCompose = async < Document extends VFile > ( dependenciesWithPosition , parent , filesInMemory ) : Promise < ComposedNarrativeSchema > => { const narrativeSchemas = await load ( dependenciesWithPosition , [ parent ] , filesInMemory , [ ] ) ; return compose ( narrativeSchemas ) ; } ;