Simplify types

This commit is contained in:
schmelczerandras 2020-10-06 14:08:43 +02:00
parent 6eddb4834b
commit ba8b1a29fd
30 changed files with 52 additions and 76 deletions

View file

@ -2,8 +2,12 @@ import { CommandReceiver } from '../commands/command-receiver';
import { Id } from '../transport/identity';
export abstract class GameObject extends CommandReceiver {
public static get type(): string {
return (this as any).name;
}
public get type(): string {
return (this as any).constructor.type;
return (this as any).constructor.name;
}
constructor(public readonly id: Id) {