Closed EvilG-MC closed 2 months ago
There is literally no type change
map.get() is on default returns: Value | undefined In this case: players.get() returns: Player | undefined
There is no need of enforcing, that's what i mean
Well...
If I go to the type definition:
ok
That's why I enforce the type
I have added more "enforcements", will add more in the future, then somewhen merge it
Will do it for EVERY function.
Thanks
Sounds good to me! Thanks
I merged it, and will add more type enforcements with the v2.4.x release, thanks
The
getPlayer
method always returns thePlayer
type, even though it may beundefined
the solution is to force the type to make sure in case of typescript users it isPlayer | undefined
.