@kognifai/cogsengine
    Preparing search index...

    Class EntityFactory<T>

    Internal Factory class used to create entities:

    Type Parameters

    Implements

    Index

    Constructors

    Methods

    Constructors

    • Type Parameters

      Parameters

      • entityType: string
      • extension: string
      • runtime: Runtime

      Returns EntityFactory<T>

    Methods

    • Creates new entity of the type T.

      Parameters

      • Optionalname: string

        Optional name of the new entity

      Returns T

      Created entity

      Trying to create unsupported entity (or extension not loaded)

    • Binds to an existing entity with given name and type T.

      Parameters

      • name: string

        Name of Entity to bind to.

      Returns T

      Found entity. Null returned if name not found or entity type mismatch