Merge pull request #258 from daimond113/fix/remove-entity-type-generic

Remove data generic from entity in hooks
This commit is contained in:
EncodedVenom 2025-07-26 18:48:23 -04:00 committed by GitHub
commit 0606bf70f0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

4
jecs.d.ts vendored
View file

@ -156,8 +156,8 @@ export class World {
* @param hook The hook to install.
* @param value The hook callback.
*/
set<T>(component: Entity<T>, hook: StatefulHook, value: (e: Entity<T>, id: Id<T>, data: T) => void): void;
set<T>(component: Entity<T>, hook: StatelessHook, value: (e: Entity<T>, id: Id<T>) => void): void;
set<T>(component: Entity<T>, hook: StatefulHook, value: (e: Entity, id: Id<T>, data: T) => void): void;
set<T>(component: Entity<T>, hook: StatelessHook, value: (e: Entity, id: Id<T>) => void): void;
/**
* Assigns a value to a component on the given entity.
* @param entity The target entity.