Skip to content
This repository was archived by the owner on Apr 13, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/System.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export interface SystemQueries {
/**
* A system that manipulates entities in the world.
*/
export abstract class System<EntityType extends Entity = Entity> {
export abstract class System<EntityType extends Entity = Entity, WorldType extends World<EntityType> = World<EntityType>> {
/**
* Defines what Components the System will query for.
* This needs to be user defined.
Expand All @@ -30,7 +30,7 @@ export abstract class System<EntityType extends Entity = Entity> {

static isSystem: true;

constructor(world: World<EntityType>, attributes?: Attributes);
constructor(world: WorldType, attributes?: Attributes);

/**
* The results of the queries.
Expand All @@ -45,7 +45,7 @@ export abstract class System<EntityType extends Entity = Entity> {
}
}

world: World<EntityType>;
world: WorldType;

/**
* Whether the system will execute during the world tick.
Expand Down