derivablejs
derivablejs copied to clipboard
Typescript error when declare function, that returns promise to Derivable.
I cant declare function, that returns promise to Derivable. Reason is next:
interface Some {
then(callback);
}
// Error: the return type of an async function must either be a valid promise or must not contain a callable 'then' member.
async function foo(): Promise<Some> {
return null;
}
Because of that I can't use async/await.
Looks like we should rename then method to chain