mirror of
https://github.com/Ukendio/jecs.git
synced 2025-08-04 03:09:18 +00:00
fix: allow union undefined union to be passed in .add
This commit is contained in:
parent
a0e7bf25ce
commit
bdb51e633f
1 changed files with 1 additions and 1 deletions
2
jecs.d.ts
vendored
2
jecs.d.ts
vendored
|
@ -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<C>(entity: Entity, component: undefined extends InferComponent<C> ? C : Id<undefined>): void;
|
||||
|
||||
/**
|
||||
* Assigns a value to a component on the given entity.
|
||||
|
|
Loading…
Reference in a new issue