fix: allow union undefined union to be passed in .add

This commit is contained in:
duck.__index 2025-05-16 20:15:53 -07:00
parent a0e7bf25ce
commit bdb51e633f

2
jecs.d.ts vendored
View file

@ -149,7 +149,7 @@ export class World {
* @param entity The target entity. * @param entity The target entity.
* @param component The component (or tag) to add. * @param component The component (or tag) to add.
*/ */
add(entity: Entity, component: Id): void; add<C>(entity: Entity, component: undefined extends InferComponent<C> ? C : Id<undefined>): void;
/** /**
* Assigns a value to a component on the given entity. * Assigns a value to a component on the given entity.