mirror of
https://github.com/Ukendio/jecs.git
synced 2026-02-04 15:15:21 +00:00
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:
parent
b3d3a2bcdd
commit
fbc4f0f3aa
1 changed files with 4 additions and 0 deletions
4
src/jecs.d.ts
vendored
4
src/jecs.d.ts
vendored
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue