Open MihailSandulescu opened 1 year ago
Can I try to take this one and address it?
@kirillkurko see https://github.com/microsoft/TypeScript/blob/634d3a1db5c69c1425119a74045790a4d1dc3046/CONTRIBUTING.md#issue-claiming, you can just get started working on issues marked Help Wanted π. Are you still interested in this one?
Bug Report
file
node_modules/typescript/lib/lib.es5.d.ts
, lines 1386, 1392, 1393, 1399. ParameterpreviousValue
of thecallbackfn
inreduce(callbackfn: (previousValue: T, currentValue: T, currentIndex: number, array: T[]) => T)
method is namedaccumulator
in the JSDoc, instead ofpreviousValue
, potentially causing confusion when reading the documentation provided.π Search Terms
Array<T>.reduce<U>
,Array<T>.reduce<U>(callbackfn:(previousValue
,accumulator
π Version & Regression Information
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
previousValue
parameter ofcallbackfn
is namedaccumulator
in JSDocπ Expected behavior
Either
previousValue
parameter ofcallbackfn
should be namedpreviousValue
in JSDoc, or the parameter ofcallbackfn
should be renamed toaccumulator
, in order to avoid confusion.