Static properties supported by all behaviors.

interface Type {
    new Typenew (agent: Agent, backing: BehaviorBacking): Behavior;
    defaults: Record<string, any>;
    dependencies?: Iterable<Type, any, any>;
    early: boolean;
    Events: typeof EventEmitter;
    id: string;
    Internal: (new () => {});
    name: string;
    schema?: Schema;
    set: (<This>(this: This, defaults: Partial<RelaxTypes<InstanceType<This["State"]>>>) => This);
    State: (new () => {});
    supervisor: RootSupervisor;
    supports: ((other: Type) => boolean);
}

Constructors

Properties

defaults: Record<string, any>
dependencies?: Iterable<Type, any, any>
early: boolean
Events: typeof EventEmitter
id: string
Internal: (new () => {})
name: string
schema?: Schema
set: (<This>(this: This, defaults: Partial<RelaxTypes<InstanceType<This["State"]>>>) => This)

Type declaration

    • <This>(this, defaults): This
    • Create a new behavior with different default state values.

      Type Parameters

      Parameters

      Returns This

State: (new () => {})
supervisor: RootSupervisor
supports: ((other: Type) => boolean)

Type declaration

    • (other): boolean
    • Does this behavior support functionality of a specific implementation?

      Parameters

      Returns boolean