Class ManagedFactory<T>

Type Parameters

Hierarchy

Constructors

Properties

db: EntityManager = ...

The owning EntityManager where this factory belongs to

managedType: ManagedType<T> = ...

The managed type of this factory

methods: {
    [methodName: string]: any;
} = ...

Methods that are added to object instances This property is an alias for this factory type prototype

Name

methods

Type declaration

  • [methodName: string]: any
prototype: T = ...
type: Class<T> = ...

Methods

  • Add a method to instances of this factories type

    Returns

    Parameters

    • name: string

      The method name to add

    • fn: Function

      The Method to add

    Returns void

  • Adds methods to instances of this factories type

    Returns

    Parameters

    • methods: {
          [name: string]: Function;
      }

      The methods to add

      • [name: string]: Function

    Returns void

  • Creates a new instance and sets the Managed Object to the given json

    Returns

    A new created instance of T

    Parameters

    Returns T

  • Creates a new instance of the factory type

    Returns

    A new created instance of *

    Instance

    Parameters

    • Rest ...args: any[]

      Constructor arguments used for instantiation

    Returns T

  • Creates a new instance of the factory type

    Returns

    A new created instance of *

    Instance

    Parameters

    • Optional args: IArguments | any[]

      Constructor arguments used for instantiation

    Returns T

  • Creates a new Factory for the given type

    Returns

    A new object factory to created instances of T

    Type Parameters

    Parameters

    • this: Class<F>
    • type: Class<T>

      the type constructor of T

    Returns F & InstanceFactory<T>

Generated using TypeDoc