Closed tafelito closed 8 years ago
It's simple, you just need to make sure that you create the new typings as it was defined before.
In this case, the original typings or meteor/accounts-base
defines Accounts
as module inside the exported module, and then inside the functions are defined. In this way, you can extend the module and add the missing functions.
So in order to solve that issue, add a new file or append to ./typings.d.ts
file the following:
declare module 'meteor/accounts-base' {
module Accounts {
function requestPhoneVerification(phoneNumber: string, callback?: Function): void;
function verifyPhone(phoneNumber: string, code: string, callback?: Function): void;
}
}
I am keeping the issue open until I'll fix it in the tutorial :)
Thanks for noticing @tafelito !
Fixed in the commits and soon will be updated in the tutorial.
Thanks @tafelito !
Awesome, thanks @dotansimha! there is no need to declare API functions that are not being used, likeisPhoneVerified
, right?
You don't have to add them.
@dotansimha i have been added this code but there is an error occur of can not find meteor/accounts-base. What can I do ?
@dotansimha How do you solve this typing issues? I know they are just warnings and do not affect the code, but I wasn't sure how to declare the module in this case, because the package
okland:accounts-phone
is an extension of the meteor accounts-base. I tried the following with no successThanks