Interface ComponentsJsFactory

Used for instantiating new object using Components.js configurations.

interface ComponentsJsFactory {
    generate: (<T>(configPath: string, componentIri: string, variables: Record<string, unknown>) => Promise<T>);
}

Implemented by

Properties

Properties

generate: (<T>(configPath: string, componentIri: string, variables: Record<string, unknown>) => Promise<T>)

Instantiates a new object using Components.js.

Type declaration

    • <T>(configPath, componentIri, variables): Promise<T>
    • Type Parameters

      • T

      Parameters

      • configPath: string

        Location of the config to instantiate.

      • componentIri: string

        IRI of the object in the config that will be the result.

      • variables: Record<string, unknown>

        Variables to send to Components.js

      Returns Promise<T>

      The resulting object, corresponding to the given component IRI.