Add type overloads for World.has method

This commit is contained in:
Ukendio 2025-04-13 01:52:41 +02:00
parent 447bb76bb8
commit fc4f4a6a3a

View file

@ -2420,7 +2420,10 @@ export type World = {
& <A, B, C, D>(self: World, id: Entity, Id<A>, Id<B>, Id<C>, Id<D>) -> (A?, B?, C?, D?), & <A, B, C, D>(self: World, id: Entity, Id<A>, Id<B>, Id<C>, Id<D>) -> (A?, B?, C?, D?),
--- Returns whether the entity has the ID. --- Returns whether the entity has the ID.
has: (self: World, entity: Entity, ...Id) -> boolean, has: (<A>(World, Entity, A) -> boolean)
& (<A, B>(World, Entity, A, B) -> boolean)
& (<A, B, C>(World, Entity, A, B, C) -> boolean)
& <A, B, C, D>(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. --- 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, parent:(self: World, entity: Entity) -> Entity,