Fix regression with set overloads

This commit is contained in:
daimond113 2025-06-09 23:21:55 +02:00
parent 28ef8d7234
commit b480423312
No known key found for this signature in database
GPG key ID: 640DC95EC1190354

15
jecs.d.ts vendored
View file

@ -151,14 +151,6 @@ export class World {
*/
add<C>(entity: Entity, component: undefined extends InferComponent<C> ? C : Id<undefined>): 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<T>(entity: Entity, component: Id<T>, 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<T>(component: Entity<T>, hook: StatelessHook, value: (e: Entity<T>, id: Id<T>) => 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<T>(entity: Entity, component: Id<T>, value: T): void;
/**
* Cleans up the world by removing empty archetypes and rebuilding the archetype collections.