diff --git a/types/webappsec-credential-management/index.d.ts b/types/webappsec-credential-management/index.d.ts index b2bc6bc006..ad423eb940 100644 --- a/types/webappsec-credential-management/index.d.ts +++ b/types/webappsec-credential-management/index.d.ts @@ -1,7 +1,8 @@ -// Type definitions for non-npm package W3C (WebAppSec) Credential Management API Level 1, 0.3 +// Type definitions for non-npm package W3C (WebAppSec) Credential Management API Level 1, 0.4 // Project: https://github.com/w3c/webappsec-credential-management // Definitions by: Iain McGinniss // Joao Peixoto +// Michael J. Currie // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped // TypeScript Version: 2.7 @@ -444,7 +445,7 @@ type AuthenticatorAttachment = "platform" | "cross-platform"; interface AuthenticatorSelectionCriteria { authenticatorAttachment?: AuthenticatorAttachment; requireResidentKey?: boolean; - requireUserVerification?: UserVerificationRequirement; + userVerification?: UserVerificationRequirement; } /** diff --git a/types/webappsec-credential-management/webappsec-credential-management-tests.ts b/types/webappsec-credential-management/webappsec-credential-management-tests.ts index ade1ecfa71..78dc73837b 100644 --- a/types/webappsec-credential-management/webappsec-credential-management-tests.ts +++ b/types/webappsec-credential-management/webappsec-credential-management-tests.ts @@ -296,29 +296,28 @@ function webauthnRegister() { name: document.domain, }, user: { - id: (new Uint8Array(1)).buffer, + id: new Uint8Array(1).buffer, name: 'test user', displayName: 'test user', }, challenge, - pubKeyCredParams: [ - { type: 'public-key', alg: -7 }, - ], + pubKeyCredParams: [{ type: 'public-key', alg: -7 }], excludeCredentials: [ { - id: (new Uint8Array(1)).buffer, + id: new Uint8Array(1).buffer, type: 'public-key', - transports: ['ble', 'internal'] - } + transports: ['ble', 'internal'], + }, ], timeout: 5000, - attestation: "direct", + attestation: 'direct', authenticatorSelection: { - requireUserVerification: "preferred", + userVerification: 'preferred', + requireResidentKey: false, - authenticatorAttachment: "platform" + authenticatorAttachment: 'platform', }, - } + }, }); credPromise.then((cred) => {