fix: OnAdd, OnRemove and OnSet were typed as Entity<any> rendering them unusable with strict types

This commit is contained in:
Magic 2024-08-28 01:06:42 +02:00 committed by GitHub
parent 64bc3bfe7e
commit 1889486b59
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1549,9 +1549,9 @@ export type World = {
return {
World = World :: { new: () -> World },
OnAdd = EcsOnAdd :: Entity,
OnRemove = EcsOnRemove :: Entity,
OnSet = EcsOnSet :: Entity,
OnAdd = EcsOnAdd :: Entity<(entity: Entity) -> ()>,
OnRemove = EcsOnRemove :: Entity<(entity: Entity) -> ()>,
OnSet = EcsOnSet :: Entity<(entity: Entity, data: any) -> ()>,
ChildOf = EcsChildOf :: Entity,
Component = EcsComponent :: Entity,
Wildcard = EcsWildcard :: Entity,