mirror of
https://github.com/Ukendio/jecs.git
synced 2025-04-24 17:10:03 +00:00
Fix typings
This commit is contained in:
parent
970091f9a9
commit
fb47f87bd4
2 changed files with 4 additions and 5 deletions
|
@ -48,4 +48,3 @@ assert(world:get(opponentId, Health) == 92)
|
|||
```
|
||||
|
||||

|
||||
s
|
|
@ -326,7 +326,7 @@ local function noop(): any
|
|||
end
|
||||
end
|
||||
|
||||
function World.query(world: World, ...: i53): () -> (number, ...any)
|
||||
function World.query(world: World, ...: i53): (() -> (number, ...any)) | () -> ()
|
||||
local compatibleArchetypes = {}
|
||||
local components = { ... }
|
||||
local archetypes = world.archetypes
|
||||
|
@ -368,11 +368,11 @@ function World.query(world: World, ...: i53): () -> (number, ...any)
|
|||
end
|
||||
end
|
||||
|
||||
local function double(): any
|
||||
local function double()
|
||||
local lastArchetype, archetype = next(compatibleArchetypes)
|
||||
local lastRow
|
||||
|
||||
return function(): any
|
||||
return function()
|
||||
local row = next(archetype.entities, lastRow)
|
||||
while row == nil do
|
||||
lastArchetype, archetype = next(compatibleArchetypes, lastArchetype)
|
||||
|
@ -411,7 +411,7 @@ function World.query(world: World, ...: i53): () -> (number, ...any)
|
|||
|
||||
local lastRow
|
||||
|
||||
local function queryNext(): (...any)
|
||||
local function queryNext()
|
||||
local row = next(archetype.entities, lastRow)
|
||||
while row == nil do
|
||||
lastArchetype, archetype = next(compatibleArchetypes, lastArchetype)
|
||||
|
|
Loading…
Reference in a new issue