proxymise icon indicating copy to clipboard operation
proxymise copied to clipboard

Document how to use with type systems TypeScript/ Flowtype

Open gajus opened this issue 7 years ago • 1 comments

It is unclear how to define types for proxymissed promises.

Providing these guidelines would encourage broader pattern adoption.

gajus avatar Jul 30 '18 18:07 gajus

Related: https://github.com/kozhevnikov/proxymise/pull/8

csuarez avatar Oct 05 '22 08:10 csuarez

Now there is a @types/proxymise package to have correct typings:

import proxymise from 'proxymise';

function example(): ReturnType<typeof proxymise> {
       return proxymise(foo);
}

csuarez avatar Jan 27 '23 08:01 csuarez