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.