From 379ff5c35c7578aed1ff2b78263ab3c2dd2f4873 Mon Sep 17 00:00:00 2001 From: Matthew Miller Date: Mon, 20 Jun 2022 10:54:16 -0700 Subject: Attempt to cast PublicKeyCredential for new method --- packages/typescript-types/src/index.ts | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'packages/typescript-types/src') diff --git a/packages/typescript-types/src/index.ts b/packages/typescript-types/src/index.ts index b4bafc0..b0c8d2c 100644 --- a/packages/typescript-types/src/index.ts +++ b/packages/typescript-types/src/index.ts @@ -163,6 +163,14 @@ export interface PublicKeyCredentialDescriptorFuture extends Omit; +} + /** * The two types of credentials as defined by bit 3 ("Backup Eligibility") in authenticator data: * - `"singleDevice"` credentials will never be backed up -- cgit v1.2.3 From a0f1a031160584d576fdc7fe16108fa6e3305247 Mon Sep 17 00:00:00 2001 From: Matthew Miller Date: Fri, 1 Jul 2022 08:23:31 -0700 Subject: Properly type isConditionalMediationAvailable --- packages/browser/src/helpers/browserSupportsWebAuthnAutofill.ts | 2 +- packages/typescript-types/src/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'packages/typescript-types/src') diff --git a/packages/browser/src/helpers/browserSupportsWebAuthnAutofill.ts b/packages/browser/src/helpers/browserSupportsWebAuthnAutofill.ts index bda999b..ffca77d 100644 --- a/packages/browser/src/helpers/browserSupportsWebAuthnAutofill.ts +++ b/packages/browser/src/helpers/browserSupportsWebAuthnAutofill.ts @@ -22,7 +22,7 @@ export async function browserSupportsWebAuthnAutofill(): Promise { window.PublicKeyCredential as unknown as PublicKeyCredentialFuture; return ( - globalPublicKeyCredential.isConditionalMediationAvailable && + globalPublicKeyCredential.isConditionalMediationAvailable !== undefined && globalPublicKeyCredential.isConditionalMediationAvailable() ); } diff --git a/packages/typescript-types/src/index.ts b/packages/typescript-types/src/index.ts index b0c8d2c..ce5d799 100644 --- a/packages/typescript-types/src/index.ts +++ b/packages/typescript-types/src/index.ts @@ -168,7 +168,7 @@ export interface PublicKeyCredentialDescriptorFuture extends Omit; + isConditionalMediationAvailable?(): Promise; } /** -- cgit v1.2.3