[ts]
Argument of type '(yes: string) => void' is not assignable to parameter of type '(value: boolean) => void | PromiseLike<void>'.
Types of parameters 'yes' and 'value' are incompatible.
Type 'boolean' is not assignable to type 'string'.
Their example (Ionic native) seem to be wrong. The check function returns a Promise<boolean> as per the documentation and the error message say, not a Promise<string> like in the example.
Try this
this.appAvailability.check(app)
.then(
() => console.log(app + ' is available'),
() => console.log(app + ' is NOT available')
);
If that doesn’t work then maybe this
this.appAvailability.check(app)
.then(
(available: boolean) => {
if (available) {
console.log(app + ' is available')
} else {
console.log(app + ' is NOT available')
}
})
);
Either way I think the documentation is wrong if you’re getting an error with the example