fast-jwt icon indicating copy to clipboard operation
fast-jwt copied to clipboard

Add generic types to create functions

Open avin-kavish opened this issue 2 years ago • 5 comments

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?

avin-kavish avatar Apr 15 '22 03:04 avin-kavish

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

simoneb avatar Apr 15 '22 09:04 simoneb

@avin-kavish any update on this?

simoneb avatar Aug 19 '22 07:08 simoneb

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

I don't think it's complete though.

avin-kavish avatar Aug 19 '22 09:08 avin-kavish

Thanks. Are you planning to complete it?

simoneb avatar Aug 19 '22 09:08 simoneb

yeah, at some point.

avin-kavish avatar Aug 20 '22 02:08 avin-kavish