预期有 3-4 个参数,但得到了 2.ts 个 FirebaseX Ionic 本机插件

Expected 3-4 arguments, but got 2.ts FirebaseX Ionic native plugin

我需要将 Firebase Phone Auth 与 FirebaseX 插件一起使用。我试过这样:

 async getVerificationCode(): void {

    const res:any = await this.firebaseX.verifyPhoneNumber('+16505553434', 60);

  }

但它是这样说的:

Expected 3-4 arguments, but got 2.ts(2554) index.d.ts(347, 96): An argument for 'phoneNumber' was not provided.

  "@ionic/angular": "5.1.1",
  "@ionic-native/firebase-x": "^5.26.0",
  "firebase": "7.15.0",

知道如何正确使用它吗?

API:

>   verifyPhoneNumber(success: (value: string | object) => void, error:
> (err: string) => void, phoneNumber: string, timeoutDuration?: number):
> Promise<any>;
>     /**
>      * Signs the user into Firebase with credentials obtained using verifyPhoneNumber().
>      * See the Android- and iOS-specific Firebase documentation for more info.
>      * @param {object} credential - a credential object returned by the success callback of an authentication method
>      * @param {function} success - callback function to call on successful sign-in using credentials
>      * @param {function} error - callback function which will be passed a {string} error message as an argument
>      */

它期待在您的参数之前有两个回调。尝试

const res:any = await this.firebaseX.verifyPhoneNumber(() => {}, () => {}, '+16505553434', 60);