summaryrefslogtreecommitdiffhomepage
path: root/packages/typescript-types/src
diff options
context:
space:
mode:
authorMatthew Miller <matthew@millerti.me>2022-06-20 10:54:16 -0700
committerMatthew Miller <matthew@millerti.me>2022-06-20 10:54:16 -0700
commit379ff5c35c7578aed1ff2b78263ab3c2dd2f4873 (patch)
tree221c2ff6b020a3c0b01b98989b68746cf2e9dd10 /packages/typescript-types/src
parent84d931ea0aadc249a72cfd422b912dec0d52f995 (diff)
Attempt to cast PublicKeyCredential for new method
Diffstat (limited to 'packages/typescript-types/src')
-rw-r--r--packages/typescript-types/src/index.ts8
1 files changed, 8 insertions, 0 deletions
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
@@ -164,6 +164,14 @@ export interface PublicKeyCredentialDescriptorFuture extends Omit<PublicKeyCrede
}
/**
+ * A super class of TypeScript's `PublicKeyCredential` that knows about upcoming WebAuthn methods
+ */
+export interface PublicKeyCredentialFuture extends PublicKeyCredential {
+ // See https://github.com/w3c/webauthn/issues/1745
+ isConditionalMediationAvailable(): Promise<boolean>;
+}
+
+/**
* The two types of credentials as defined by bit 3 ("Backup Eligibility") in authenticator data:
* - `"singleDevice"` credentials will never be backed up
* - `"multiDevice"` credentials can be backed up