From e3e7dec95fa621876c79dff428e4636c5c78844b Mon Sep 17 00:00:00 2001 From: Satana Charuwichitratana Date: Fri, 1 Jul 2022 23:48:49 +0700 Subject: [PATCH] fix(type): Fix other functions reported in #6974 --- .../amazon-cognito-identity-js/index.d.ts | 27 ++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/packages/amazon-cognito-identity-js/index.d.ts b/packages/amazon-cognito-identity-js/index.d.ts index 910d313ef95..e5d6e99d12f 100644 --- a/packages/amazon-cognito-identity-js/index.d.ts +++ b/packages/amazon-cognito-identity-js/index.d.ts @@ -24,11 +24,20 @@ declare module 'amazon-cognito-identity-js' { userAttributes: any, requiredAttributes: any ) => void; - mfaRequired?: (challengeName: any, challengeParameters: any) => void; - totpRequired?: (challengeName: any, challengeParameters: any) => void; + mfaRequired?: ( + challengeName: ChallengeName, + challengeParameters: any + ) => void; + totpRequired?: ( + challengeName: ChallengeName, + challengeParameters: any + ) => void; customChallenge?: (challengeParameters: any) => void; - mfaSetup?: (challengeName: any, challengeParameters: any) => void; - selectMFAType?: (challengeName: any, challengeParameters: any) => void; + mfaSetup?: (challengeName: ChallengeName, challengeParameters: any) => void; + selectMFAType?: ( + challengeName: ChallengeName, + challengeParameters: any + ) => void; } export interface IMfaSettings { @@ -256,8 +265,14 @@ declare module 'amazon-cognito-identity-js' { callbacks: { onSuccess: (session: CognitoUserSession) => void; onFailure: (err: any) => void; - mfaRequired?: (challengeName: any, challengeParameters: any) => void; - totpRequired?: (challengeName: any, challengeParameters: any) => void; + mfaRequired?: ( + challengeName: ChallengeName, + challengeParameters: any + ) => void; + totpRequired?: ( + challengeName: ChallengeName, + challengeParameters: any + ) => void; } ): void; }