Files
CommunitySolidServer/src/pods/generate/ComponentsJsFactory.ts
Joachim Van Herwegen 486241f3d4 docs: Fix language
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
2024-04-02 09:16:51 +02:00

16 lines
590 B
TypeScript

/**
* Used for instantiating new object using Components.js configurations.
*/
export interface ComponentsJsFactory {
/**
* Instantiates a new object using Components.js.
*
* @param configPath - Location of the config to instantiate.
* @param componentIri - IRI of the object in the config that will be the result.
* @param variables - Variables to send to Components.js
*
* @returns The resulting object, corresponding to the given component IRI.
*/
generate: <T>(configPath: string, componentIri: string, variables: Record<string, unknown>) => Promise<T>;
}