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 GitHub
parent 18b72149c7
commit b5bd5a9a02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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 {