await-to-js
await-to-js copied to clipboard
fix: add readonly to promise type for flexibility
trafficstars
When using this library with algoliasearch (whose return types are always Readonly<Promise<T>>), I've had to use a wrapper function so that I can update those types.
This allows for more flexibility (i.e. by reducing the required properties on the Promise object) and for use with more restrictive libraries like algoliasearch.
@scopsy I'd love to get this merged and released as soon as you've got time! Awesome work on this library by the way. I never knew that such a small piece of code could be so useful.