From b480423312bc2dae0c337b515cd1ea7efe473b23 Mon Sep 17 00:00:00 2001 From: daimond113 Date: Mon, 9 Jun 2025 23:21:55 +0200 Subject: [PATCH] Fix regression with set overloads --- jecs.d.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/jecs.d.ts b/jecs.d.ts index 6b18f36..b97dda1 100644 --- a/jecs.d.ts +++ b/jecs.d.ts @@ -151,14 +151,6 @@ export class World { */ add(entity: Entity, component: undefined extends InferComponent ? C : Id): void; - /** - * Assigns a value to a component on the given entity. - * @param entity The target entity. - * @param component The component definition (could be a Pair or Entity). - * @param value The value to store with that component. - */ - set(entity: Entity, component: Id, value: T): void; - /** * Installs a hook on the given component. * @param component The target component. @@ -173,6 +165,13 @@ export class World { * @param value The hook callback. */ set(component: Entity, hook: StatelessHook, value: (e: Entity, id: Id) => void): void; + /** + * Assigns a value to a component on the given entity. + * @param entity The target entity. + * @param component The component definition (could be a Pair or Entity). + * @param value The value to store with that component. + */ + set(entity: Entity, component: Id, value: T): void; /** * Cleans up the world by removing empty archetypes and rebuilding the archetype collections.