Simplify types
This commit is contained in:
parent
6eddb4834b
commit
ba8b1a29fd
30 changed files with 52 additions and 76 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue