prefer-reduce-type-parameter
Configuration
rslint.config.ts
Rule Details
Enforce using type parameters for Array#reduce instead of type assertions on the initial value. When calling Array#reduce, it is common to use a type assertion (as) on the initial value to specify the result type. However, Array#reduce accepts a type parameter that achieves the same result in a cleaner way without requiring a type assertion.
Examples of incorrect code for this rule:
Examples of correct code for this rule: