I tried to keep this PR as focused to converting from jsdoc to typescript as possible.
I believe there are only a few problem areas to focus on:
limitInParallel and memoizeTtl have @ts-ignore for the return values, which I don't know how to address
callbackify and promisify do not carry type information of the original function because it would require too much typing to catch patterns like (...args, cb) => any (currently typescript has no way of doing that and utility types from ts-toolbelt are too complex and typescript bails out because of the complexity). As far as I understand though, because we use unknown, this forces the caller to type the result before using it.
I tried to keep this PR as focused to converting from jsdoc to typescript as possible.
I believe there are only a few problem areas to focus on:
limitInParallel
andmemoizeTtl
have@ts-ignore
for the return values, which I don't know how to addresscallbackify
andpromisify
do not carry type information of the original function because it would require too much typing to catch patterns like(...args, cb) => any
(currently typescript has no way of doing that and utility types from ts-toolbelt are too complex and typescript bails out because of the complexity). As far as I understand though, because we useunknown
, this forces the caller to type the result before using it.