Compare commits

..

No commits in common. "bd00edc8c092a971684dbd5426329d09ad61c9c6" and "65a27a798af20c2f54a966fadbd5f1e4c335d20a" have entirely different histories.

18
jecs.d.ts vendored
View file

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