already
already copied to clipboard
Utility functions for promises; finally, map, filter, etc
This PR improves the return type of the `props` function ```ts const val = await props( { a: 1, b: delay( 10 ).then( ( ) => 2 ) } );...
When using wrapFunction, the after function doesn't get an exception if the wrapped function threw one/returned a rejected promise, which would be useful as a reusable error logger.
may be props1, props2, props3? https://stackoverflow.com/questions/28250680/how-do-i-access-previous-promise-results-in-a-then-chain?noredirect=1&lq=1 https://stackoverflow.com/questions/28714298/how-to-chain-and-share-prior-results-with-promises?noredirect=1&lq=1 trying to simplify this, but being typed (no any) ``` const connect = async (): Promise => DirectSecp256k1HdWallet.fromMnemonic(ALICE, { prefix: PREFIX, }) .then(x...