Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TS move() comp returns Comp type, and that "bugs" add() return type #691

Closed
lajbel opened this issue Mar 11, 2023 · 0 comments · Fixed by #730
Closed

TS move() comp returns Comp type, and that "bugs" add() return type #691

lajbel opened this issue Mar 11, 2023 · 0 comments · Fixed by #730

Comments

@lajbel
Copy link
Contributor

lajbel commented Mar 11, 2023

The move component typescript returns a Comp type

image

And that makes the type returned by add() be only Game<Comp>

image

If I remove move() component, this is transformed in

image

I think the fix is to make an extended Comp type for move(), such MoveComp.

@lajbel lajbel changed the title TS move() comp returns Comp and that bugs game object type TS move() comp returns Comp type, and that "bugs" add() return type Mar 11, 2023
@lajbel lajbel changed the title TS move() comp returns Comp type, and that "bugs" add() return type TS move() comp returns Comp type, and that "bugs" add() return type Mar 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant