Client

Hierarchy

Implements

Index

Constructors

Properties

Methods

Object literals

Constructors

constructor

+ new Client(props?: Props): Client

Creates an instance of Client. Creates an instance of Client.

remarks Since were dealing with special cases, mixins and limits of TypeScript, we use of "invoking multiple base constructors" from polytype to pass props to Struct's constructor: https://www.npmjs.com/package/polytype#invoking-multiple-base-constructors

remarks Since were dealing with special cases, mixins and limits of TypeScript, we use of "invoking multiple base constructors" from polytype to pass props to Struct's constructor: https://www.npmjs.com/package/polytype#invoking-multiple-base-constructors

Parameters:

NameTypeDescription
props?PropsProperties of the type required for construction.

Returns: Client

Properties

id

• id: string | Guid


state

• state: State

Implementation of Stateful.state

Overrides StatefulMixin.state

Methods

getId

▸ getId(): string | Guid

Returns client identifier.

Returns: string | Guid

Client's identifier.


getSelectableStates

▸ getSelectableStates(): Record‹string, State›

Implementation of Stateful

Inherited from StatefulMixin.getSelectableStates

Overrides Task.getSelectableStates

Returns: Record‹string, State›


getState

▸ getState(): State

Implementation of Stateful

Inherited from StatefulMixin.getState

Overrides Task.getState

Returns: State


hasState

▸ hasState(): boolean

Implementation of Stateful

Inherited from StatefulMixin.hasState

Overrides Task.hasState

Returns: boolean


isInOneOfStates

▸ isInOneOfStates(states: State | State[]): boolean

Implementation of Stateful

Inherited from StatefulMixin.isInOneOfStates

Overrides Task.isInOneOfStates

Parameters:

NameType
statesState | State[]

Returns: boolean


isInState

▸ isInState(state: State | State[]): boolean

Implementation of Stateful

Inherited from StatefulMixin.isInState

Overrides Task.isInState

Parameters:

NameType
stateState | State[]

Returns: boolean


setState

▸ setState(state: State): void

Implementation of Stateful

Inherited from StatefulMixin.setState

Overrides Task.setState

Parameters:

NameType
stateState

Returns: void


validateState

▸ validateState(stateOrStates: State | State[], error?: Error): boolean

Implementation of Stateful

Inherited from StatefulMixin.validateState

Overrides Task.validateState

Parameters:

NameType
stateOrStatesState | State[]
error?Error

Returns: boolean

Object literals

Static STATES

▪ STATES: object

connected

• connected: string = "connected"

constructed

• constructed: string = "constructed"

disconnected

• disconnected: string = "disconnected"

failed

• failed: string = "failed"

initialized

• initialized: string = "initialized"

paused

• paused: string = "paused"

stopped

• stopped: string = "stopped"