Change log
Full Changelog
- Add a generic as return type so the user can specify what's expected, this will still be
unknown by default
- Export
JwtHeaderand JwtPayload that can be used with the generic return type as-is or extended.
Full Changelog
- Add TypeScript type definition
- Fix CJS default export
Full Changelog
- Include an ESM build for native JavaScript imports
Warning: this version has some potentially breaking changes!
- If you've previously imported the library as
import * as jwt_decode from 'jwt-decode', you'll have to change your import to import jwt_decode from 'jwt-decode';.