I'm implementing a JS function into typescript, it works fine on JS, but on TS, I get:
[ts] Cannot find name 'PasscodeAuth'. Did you mean 'passcodeAuth'?
function passcodeAuth() {
return PasscodeAuth.isSupported()
.then(() => {
return PasscodeAuth.authenticate()
})
.then(success => {
AlertIOS.alert('Authenticated Successfully');
})
.catch(error => {
console.log(error)
AlertIOS.alert(error.message);
});
}
So is not an import, or defined anywhere, but it works on JS, so how can I make it recognizable for TS? On JS, I can name my parameter as any word on JS and it will have isSupported and authenticate, even though is now a real parameter?
thanks!
declare var PasscodeAuth: any;.