Is there way to use protractor filter which accepts a function that returns protractor's own Promise type, with my own function that returns native Promise?
const myFilter = async(e: ElementFinder): Promise<boolean> => {
...
}
myElements.filter(myFilter)
This raises TypeScript compilation error
TS2345:Argument of type '(e: ElementFinder) => >Promise' is not assignable to parameter of type '(element: >ElementFinder, index?: number) => boolean | Promise'. Type 'Promise' is not assignable to type 'boolean | Promise'. Type 'Promise' is not assignable to type 'promise.Promise'. Property 'cancel' is missing in type 'Promise'.
BTW, I cannot create protractor's Promise myself, because of deprecaion (https://github.com/SeleniumHQ/selenium/issues/2969)