mirror of
https://github.com/CommunitySolidServer/CommunitySolidServer.git
synced 2024-10-03 14:55:10 +00:00
16 lines
590 B
TypeScript
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>;
|
|
}
|