Add types for (Cached)Query.has (#286)

* ts type update

* changed to hard tabs

* reverted back to old formatting for some

* more fixes

* only keep query has
This commit is contained in:
maeriil 2025-12-01 14:21:40 -05:00 committed by Ukendio
parent b3d3a2bcdd
commit fbc4f0f3aa

4
src/jecs.d.ts vendored
View file

@ -77,6 +77,8 @@ export type CachedQuery<T extends Id[]> = {
* @returns An array of archetypes of the query
*/
archetypes(): Archetype<T>[];
has(entity: Entity): boolean;
} & Iter<T>;
export type Query<T extends Id[]> = {
@ -111,6 +113,8 @@ export type Query<T extends Id[]> = {
* @returns An array of archetypes of the query
*/
archetypes(): Archetype<T>[];
has(entity: Entity): boolean;
} & Iter<T>;
export class World {