diff --git a/src/index.d.ts b/src/index.d.ts index 643bfc9..ce79bf1 100644 --- a/src/index.d.ts +++ b/src/index.d.ts @@ -29,13 +29,14 @@ export interface IQueryConfig { } export declare class System { - constructor(world: World, ...initArgs: any[]); + get sysName(): string; + constructor(world: World, ...initArgs: unknown[]); world: World; changes: IComponentChange[]; queries: Query[]; lastTick: number; static subscriptions: string[]; - init(...initArgs: any[]): void; + init(...initArgs: unknown[]): void; update(tick: number): void; createQuery(init?: IQueryConfig): Query; subscribe(type: string | ComponentClass): void; diff --git a/src/system.js b/src/system.js index 8c5093b..a262f86 100644 --- a/src/system.js +++ b/src/system.js @@ -1,6 +1,11 @@ const Query = require('./query'); class System { + + get sysName() { + return this.constructor.name; + } + constructor(world, ...initArgs) { this.world = world; this._stagedChanges = [];