panva / paseto

PASETO (Platform-Agnostic SEcurity TOkens) for Node.js with no dependencies
MIT License
428 stars 26 forks source link

fix: add generics to complete payload results and decode #43

Closed krisgardiner closed 1 year ago

krisgardiner commented 1 year ago

Adds generic to v3 methods so consumers can dictate return type.

krisgardiner commented 1 year ago

@panva

please revert non-related, format-only changes for easier review why only v3 and v4? the generic on the method needs to have a default

Done, added for all versions.

add new tests

How would you suggest to do this? test-types runs without errors.