webauthn-open-source / fido2-lib

A node.js library for performing FIDO 2.0 / WebAuthn server functionality
https://webauthn.io
MIT License
394 stars 118 forks source link

Add Section on Setting up Type Declarations for Deno in README.md #127

Closed PeronGH closed 1 year ago

PeronGH commented 1 year ago

I was attempting to use this library in my project but discovered that simply importing main.js does not include typings. It took me some time to figure out that using an import map and the @deno-types comment can provide types when importing. This PR aims to help other Deno users avoid the same issue.

codecov-commenter commented 1 year ago

Codecov Report

Patch and project coverage have no change.

Comparison is base (404fd71) 92.97% compared to head (cbaff9b) 92.97%.

:exclamation: Current head cbaff9b differs from pull request most recent head a394a26. Consider uploading reports for the commit a394a26 to get more accurate results

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #127 +/- ## ======================================= Coverage 92.97% 92.97% ======================================= Files 16 16 Lines 6007 6007 ======================================= Hits 5585 5585 Misses 422 422 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

JamesCullum commented 1 year ago

Thanks for the great contribution! I feel like the README becomes a bit long with this. Can you put the Deno parts into a collapsible to help with that?

Also does the example with without a version? While we do mention to add a specific version, I feel like we have to clarify it more in all examples and make it so people can't forget it. What do you think of using something like "" instead of the "x", so that code will not run unless the user inserts the correct version?

JamesCullum commented 1 year ago

Thanks a lot and have a nice weekend 🥇