@pkmn/sets: functionality of Sets
functions don't match types
#37
Labels
bug
Something isn't working
Sets
functions don't match types
#37
Describe the bug:
The return value of some of the functions in @pkmn/sets don't match the types assigned to them. Specifically:
Sets.unpackSet
's return potentially lacks two properties fromPokemonSet
:gender
andlevel
;Sets.importSet
returnsundefined
when given a string containing only spaces;Sets.canonicalize
throws when given aPokemonSet
partial that doesn't havespecies
ormoves
— the latter in particular can happen when giving it the output ofSets.importSet
.Example:
Expected behavior:
The functions' parameter and return types should match their implementations.
Additional context:
I'd be willing to open a PR to fix the issues, but I'd have to know whether the types or the implementations should be changed.
The text was updated successfully, but these errors were encountered: