diff --git a/src/init.luau b/src/init.luau index a6e2a13..9d4b257 100644 --- a/src/init.luau +++ b/src/init.luau @@ -1198,6 +1198,7 @@ do local it = { __iter = world_query_iter, + iter = world_query_iter, drain = world_query_drain, next = world_query_next, with = world_query_with, @@ -1214,7 +1215,7 @@ end -- __nominal_type_dont_use could not be any or T as it causes a type error -- or produces a union -export type Entity = number & { __DO_NOT_USE_OR_YOU_WILL_BE_FIRED: T } +export type Entity = number & { __DO_NOT_USE_OR_YOU_WILL_BE_FIRED: T } export type Pair = number export type QueryShim = typeof(setmetatable({ @@ -1222,6 +1223,9 @@ export type QueryShim = typeof(setmetatable({ with = noop :: (QueryShim, ...i53) -> QueryShim, drain = noop :: (QueryShim) -> QueryShim, replace = noop :: (QueryShim, fn: (T...) -> T...) -> (), + iter = function(self: QueryShim): () -> (number, T...) + return noop + end }, { __iter = function(): () -> (number, T...) return nil :: any @@ -1398,8 +1402,8 @@ return { OnAdd = EcsOnAdd :: Entity, OnRemove = EcsOnRemove :: Entity, OnSet = EcsOnSet :: Entity, - ChildOf = EcsChildOf, - Component = EcsComponent, + ChildOf = EcsChildOf :: Entity, + Component = EcsComponent :: Entity, Wildcard = EcsWildcard :: Entity, w = EcsWildcard :: Entity, Rest = EcsRest :: Entity,