Zaubrik / djwt

Create and verify JSON Web Tokens (JWT) with Deno or the browser.
MIT License
228 stars 23 forks source link

Moving to JavaScript with JSDoc? #68

Closed timonson closed 1 year ago

timonson commented 2 years ago

By moving to JavaScript including JSDoc we could make djwt compatible with the browser. By adding // @ts-check to the top of the files, it is my understanding that type checks would be executed in importing TypeScript files even if the developer would not have enabled the compiler option "checkJs" inside his deno.json file.

Am I overlooking any disadvantages or problems here?

Thanks!

timonson commented 2 years ago

This approach wouldn't work with the TypeScript dependency base64url from std.

lucsoft commented 2 years ago

Don't do this. Stripping types is also very simple and the Deno guys want this stripping types feature also build in into deno.land/x.

I think it's a downgrade (IMO) as JSDocs also makes code less readable