Skip to content
Snippets Groups Projects
Commit 1e62dbcc authored by David Sehnal's avatar David Sehnal
Browse files

mol-state: tweaked StateObject.is

parent 02dfc89b
No related branches found
No related tags found
No related merge requests found
......@@ -27,9 +27,9 @@ namespace StateObject {
export type From<C extends Ctor> = C extends Ctor<infer T> ? T : never
export function create<Data, T extends Type>(type: T) {
return class implements StateObject<Data, T> {
return class O implements StateObject<Data, T> {
static type = type;
static is(obj?: StateObject): obj is StateObject<Data, T> { return !!obj && type === obj.type; }
static is(obj?: StateObject): obj is O { return !!obj && type === obj.type; }
id = UUID.create22();
type = type;
label: string;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment