From bdb51e633f2e75de2962848b412274b73516e81a Mon Sep 17 00:00:00 2001 From: "duck.__index" <138041510+NormalDuck@users.noreply.github.com> Date: Fri, 16 May 2025 20:15:53 -0700 Subject: [PATCH] fix: allow union undefined union to be passed in .add --- jecs.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jecs.d.ts b/jecs.d.ts index 9b53bf5..6047d30 100644 --- a/jecs.d.ts +++ b/jecs.d.ts @@ -149,7 +149,7 @@ export class World { * @param entity The target entity. * @param component The component (or tag) to add. */ - add(entity: Entity, component: Id): void; + add(entity: Entity, component: undefined extends InferComponent ? C : Id): void; /** * Assigns a value to a component on the given entity.