From fc4f4a6a3ab8dd8f31684e030f20f9cacae0cf8d Mon Sep 17 00:00:00 2001 From: Ukendio Date: Sun, 13 Apr 2025 01:52:41 +0200 Subject: [PATCH] Add type overloads for World.has method --- jecs.luau | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jecs.luau b/jecs.luau index 4622c65..d4da4ed 100644 --- a/jecs.luau +++ b/jecs.luau @@ -2420,7 +2420,10 @@ export type World = { & (self: World, id: Entity, Id, Id, Id, Id) -> (A?, B?, C?, D?), --- Returns whether the entity has the ID. - has: (self: World, entity: Entity, ...Id) -> boolean, + has: ((World, Entity, A) -> boolean) + & ((World, Entity, A, B) -> boolean) + & ((World, Entity, A, B, C) -> boolean) + & (World, Entity, A, B, C, D) -> boolean, --- Get parent (target of ChildOf relationship) for entity. If there is no ChildOf relationship pair, it will return nil. parent:(self: World, entity: Entity) -> Entity,