7 lines
240 B
JavaScript
7 lines
240 B
JavaScript
//// [genericContextualTypingSpecialization.ts]
|
|
var b: number[];
|
|
b.reduce<number>((c, d) => c + d, 0); // should not error on '+'
|
|
|
|
//// [genericContextualTypingSpecialization.js]
|
|
var b;
|
|
b.reduce(function (c, d) { return c + d; }, 0);
|