Add PasswordCredential type (#868)

This commit is contained in:
Marek Choiński 2020-11-30 11:26:51 +01:00 committed by GitHub
parent 6762e7bf3f
commit 375de15a6b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -1,7 +1,7 @@
import { User } from "@saleor/fragments/types/User";
export const isSupported = !!(
navigator?.credentials?.preventSilentAccess && PasswordCredential
navigator?.credentials?.preventSilentAccess && window.PasswordCredential
);
export async function login<T>(

4
webpack.d.ts vendored
View file

@ -4,3 +4,7 @@ declare module "*.svg" {
const content: any;
export default content;
}
declare interface Window {
PasswordCredential: PasswordCredential;
}