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

This commit is contained in:
Magic 2024-08-28 10:12:04 +02:00 committed by GitHub
parent 64bc3bfe7e
commit ff98e8b5fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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