Export `PublicKeyCredentialRequestOptionsJSON`
dartess opened this issue · 3 comments
dartess commented
Please add export type PublicKeyCredentialRequestOptionsJSON
, we prepare it using a separate method.
lgarron commented
I think you're looking for CredentialRequestOptionsJSON
?
import { type CredentialRequestOptionsJSON, get, create } from "@github/webauthn-json";
const r: CredentialRequestOptionsJSON = { /* … */ };
console.log(await get(r));
dartess commented
No, but I was a little hasty in the code review and didn’t get into the code. We just used CredentialRequestOptionsJSON['publicKey']
instead of PublicKeyCredentialRequestOptionsJSON
. Sorry! 🙏
lgarron commented
We just used
CredentialRequestOptionsJSON['publicKey']
instead ofPublicKeyCredentialRequestOptionsJSON
.
Yeah, this is the way to get the type of a field if you really need. Glad it worked out for you!