From edf2e642c4019b676b9191e20d47043e255552b8 Mon Sep 17 00:00:00 2001 From: nonamie <53796817+mathfox@users.noreply.github.com> Date: Mon, 9 Dec 2024 14:28:08 +0300 Subject: [PATCH] type refactors --- jecs.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jecs.d.ts b/jecs.d.ts index d3410d9..b577b67 100644 --- a/jecs.d.ts +++ b/jecs.d.ts @@ -121,7 +121,7 @@ export class World { * @param index Target index * @returns The Parent Entity if it exists */ - target(entity: Entity, relation: Entity, index: number): Entity | undefined; + target(entity: Id, relation: Entity, index: number): Entity | undefined; /** * Clears an entity from the world. @@ -149,7 +149,7 @@ export class World { * @param component Target Component * @param value Component Value */ - set(entity: Id, component: Entity, value: TData): void; + set(entity: Id, component: Entity, value: InferComponent): void; /** * Removes a component from the given entity @@ -176,7 +176,7 @@ export class World { * @param components Target Components * @returns If the entity contains the components */ - has(entity: Entity, ...components: Tag[]): boolean; + has(entity: Id, ...components: Tag[]): boolean; /** * Checks if an entity exists in the world @@ -191,7 +191,7 @@ export class World { * @param entity Target Entity * @returns Parent Entity or undefined */ - parent(entity: Entity): Entity | undefined; + parent(entity: Id): Entity | undefined; /** * Searches the world for entities that match a given query