From 35cb0bca4ef66d7788de44228b273b74410038cb Mon Sep 17 00:00:00 2001 From: dai Date: Sun, 21 Sep 2025 14:13:59 +0200 Subject: [PATCH] Make World.contains a number->Entity typeguard (#279) --- jecs.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/jecs.d.ts b/jecs.d.ts index 0b4a932..65b6728 100755 --- a/jecs.d.ts +++ b/jecs.d.ts @@ -236,6 +236,12 @@ export class World { */ 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. * @param entity The entity to verify.