Class StateEventSerializer

Generic serializer implementation for StateEvents. Note that this is NOT registered with @ObjectSerializer() because we need to create an instance of this class for EACH implementation of StateEvent. Still working that one out. For now, you'll need to manually register the serializer. You can do this with the getSerializer method.

Example

type MyState = {
id: number
}

class MyStateEvent extends StateEvent<MyState> {
public validate(state: JSONState): state is MyState {
return is<MyState>(state)
}
}

Hierarchy

Constructors

Properties

The StateEvent implementation.

injector: Container

Methods