Separate Iter from IterFn (#267)
Some checks failed
analysis / Run Luau Analyze (push) Has been cancelled
deploy-docs / build (push) Has been cancelled
publish-npm / publish (push) Has been cancelled
unit-testing / Run Luau Tests (push) Has been cancelled
deploy-docs / Deploy (push) Has been cancelled

* Separate Iter from IterFn

* Clean up
This commit is contained in:
dai 2025-08-17 22:59:06 +03:00 committed by GitHub
parent 0bc1848554
commit bd00edc8c0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

14
jecs.d.ts vendored
View file

@ -56,13 +56,21 @@ export type Archetype<T extends Id[]> = {
columns_map: { [K in T[number]]: Column<InferComponent<K>> }; columns_map: { [K in T[number]]: Column<InferComponent<K>> };
}; };
type Iter<T extends Id[]> = IterableFunction<LuaTuple<[Entity, ...InferComponents<T>]>>; type IterFn<T extends Id[]> = IterableFunction<LuaTuple<[Entity, ...InferComponents<T>]>>;
type Iter<T extends Id[]> = IterFn<T> & {
/**
* This isn't callable
* @hidden
* @deprecated
*/
(): never
};
export type CachedQuery<T extends Id[]> = { export type CachedQuery<T extends Id[]> = {
/** /**
* Returns an iterator that produces a tuple of [Entity, ...queriedComponents]. * Returns an iterator that produces a tuple of [Entity, ...queriedComponents].
*/ */
iter(): Iter<T>; iter(): IterFn<T>;
/** /**
* Returns the matched archetypes of the query * Returns the matched archetypes of the query
@ -75,7 +83,7 @@ export type Query<T extends Id[]> = {
/** /**
* Returns an iterator that produces a tuple of [Entity, ...queriedComponents]. * Returns an iterator that produces a tuple of [Entity, ...queriedComponents].
*/ */
iter(): Iter<T>; iter(): IterFn<T>;
/** /**
* Creates and returns a cached version of this query for efficient reuse. * Creates and returns a cached version of this query for efficient reuse.