Skip to content

Commit bc0a9bf

Browse files
committed
Add types to world:has()
1 parent b4a10b1 commit bc0a9bf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/init.luau

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,7 @@ do
669669
end
670670
end
671671

672-
local world_has: () -> boolean
672+
local world_has: (world: World, entityId: number, ...i53) -> boolean
673673
do
674674
function world_has(world, entity_id, ...)
675675
local id = entity_id
@@ -1015,11 +1015,13 @@ export type WorldShim = typeof(setmetatable(
10151015
--- Removes a component from the given entity
10161016
remove: (WorldShim, id: Entity, component: Entity) -> (),
10171017
--- Retrieves the value of up to 4 components. These values may be nil.
1018-
get: (<A>(WorldShim, id: any, Entity<A>) -> A)
1018+
get: (<A>(WorldShim, id: Entity, Entity<A>) -> A)
10191019
& (<A, B>(WorldShim, id: Entity, Entity<A>, Entity<B>) -> (A, B))
10201020
& (<A, B, C>(WorldShim, id: Entity, Entity<A>, Entity<B>, Entity<C>) -> (A, B, C))
10211021
& <A, B, C, D>(WorldShim, id: Entity, Entity<A>, Entity<B>, Entity<C>, Entity<D>) -> (A, B, C, D),
10221022

1023+
has: (WorldShim, Entity, ...Entity) -> boolean,
1024+
10231025
--- Searches the world for entities that match a given query
10241026
query: (<A>(WorldShim, Entity<A>) -> QueryShim<A>)
10251027
& (<A, B>(WorldShim, Entity<A>, Entity<B>) -> QueryShim<A, B>)

0 commit comments

Comments
 (0)