Options
All
  • Public
  • Public/Protected
  • All
Menu

Can be used to instantiate objects using Components.js. Default main module path is the root folder of the project. For every generate call a new manager will be made, but moduleState will be stored in between calls.

Hierarchy

  • BaseComponentsJsFactory

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

Private Readonly options

options: IComponentsManagerBuilderOptions<any>

Methods

Private buildManager

  • buildManager(): Promise<ComponentsManager<any>>

generate

  • generate<T>(configPath: string, componentIri: string, variables: Record<string, any>): Promise<T>
  • Calls Components.js to instantiate a new object.

    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, any>

      Variables to send to Components.js

    Returns Promise<T>

    The resulting object, corresponding to the given component IRI.