fix: Fix type of world:has() to explicitly take in an entity

This commit is contained in:
Mark Marks 2024-08-29 23:32:21 +02:00
parent 7b6c5ac85d
commit 04172c2e53
2 changed files with 2 additions and 1 deletions

View file

@ -17,6 +17,7 @@ The format is based on [Keep a Changelog][kac], and this project adheres to
- Applies to `world:add()`, `world:set()`, `world:remove()`, `world:get()`, `world:has()` and `world:query()`
- New exported type `Id<T = nil> = Entity<T> | Pair`
- Make `world:contains()` return a `boolean` instead of an entity which may or may not exist
- Fix `world:has()` to explicitly take in an entity (new: `(self: World, entity: Entity, ...id) -> boolean`, old: `(self: World, ...Id) -> boolean`)
## [0.2.2] - 2024-07-07

View file

@ -1537,7 +1537,7 @@ export type World = {
& (<A, B, C>(self: World, id: Entity, Id<A>, Id<B>, Id<C>) -> (A?, B?, C?))
& <A, B, C, D>(self: World, id: Entity, Id<A>, Id<B>, Id<C>, Id<D>) -> (A?, B?, C?, D?),
has: (self: World, ...Id) -> boolean,
has: (self: World, entity: Entity, ...Id) -> boolean,
parent: (self: World, entity: Entity) -> Entity,