Hi there! I'm just notifying you of a potential bug ... I haven't proven that it actually manifests, but... I'm in the process of porting this repo to Typescript, and the type checker noticed this:
In throughs/asyncMap, just as with regular throughs/map, if a string key or a RegExp is given, then util/prop() is used to generate a mapping function. However, the function returned by prop() is (val: T) => U whereas asyncMap expects a function of type
(val: T, cb: (err: any, mappedVal: U) => void) => void.
If I'm reading this correctly, when given a string or regex, asyncMap should break silently at line 32 because the callback will never be called.
If I've misinterpreted this, then my apologies for taking up your time.
Hi there! I'm just notifying you of a potential bug ... I haven't proven that it actually manifests, but... I'm in the process of porting this repo to Typescript, and the type checker noticed this:
In
throughs/asyncMap, just as with regularthroughs/map, if a string key or aRegExpis given, thenutil/prop()is used to generate a mapping function. However, the function returned byprop()is(val: T) => UwhereasasyncMapexpects a function of type(val: T, cb: (err: any, mappedVal: U) => void) => void.If I'm reading this correctly, when given a string or regex, asyncMap should break silently at line 32 because the callback will never be called.
If I've misinterpreted this, then my apologies for taking up your time.