Make World.contains a number->Entity typeguard

This commit is contained in:
daimond113 2025-09-21 14:10:57 +02:00
parent 7e1f43aff5
commit c4cc68d6be
No known key found for this signature in database

6
jecs.d.ts vendored
View file

@ -236,6 +236,12 @@ export class World {
*/ */
contains(entity: Entity): boolean; contains(entity: Entity): boolean;
/**
* Checks if an entity exists in the world.
* @param entity The entity to verify.
*/
contains(entity: number): entity is Entity;
/** /**
* Checks if an entity with the given ID is currently alive, ignoring its generation. * Checks if an entity with the given ID is currently alive, ignoring its generation.
* @param entity The entity to verify. * @param entity The entity to verify.