nearform / fast-jwt

Fast JSON Web Token implementation
https://nearform.github.io/fast-jwt/
Other
345 stars 30 forks source link

Add generic types to create functions #225

Open avin-kavish opened 2 years ago

avin-kavish commented 2 years ago

I think it would be good to have these functions generically typed. If we know the shape of the payload, we can pass it here and get better type completion.

createSigner
createVerifier  

Would you accept a PR for this?

simoneb commented 2 years ago

Absolutely! Please remember to include tests for the types in https://github.com/nearform/fast-jwt/blob/master/test/types.spec.ts

simoneb commented 2 years ago

@avin-kavish any update on this?

avin-kavish commented 2 years ago

yeah, I did some work few months back. It's in #258

I don't think it's complete though.

simoneb commented 2 years ago

Thanks. Are you planning to complete it?

avin-kavish commented 2 years ago

yeah, at some point.