You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the typing should switch from player?: Player to player: Player. This is because some arguments require Player, but the listen method returns Player | undefined which triggers the type system to raise an error. I have to use as keyword to force it to be Player type which is unnecessary. I am pretty sure player argument will return nil on the client side, I don't find any use case for using the nil so making the type from player?: Player to player: Player is more suitable I guess?
before:
I think the typing should switch from player?: Player to player: Player. This is because some arguments require Player, but the listen method returns Player | undefined which triggers the type system to raise an error. I have to use
as
keyword to force it to bePlayer
type which is unnecessary. I am pretty sure player argument will return nil on the client side, I don't find any use case for using thenil
so making the type from player?: Player to player: Player is more suitable I guess?before:
after:
The text was updated successfully, but these errors were encountered: