This error occurs when you have strictNullChecks enabled and for a good reason. Your initial value for Array.reduce is {bar: []} which cannot be resolved to a safe type. Is the array any[] or number[]? Hence, TypeScript assumes it is never[] as it cannot infer the type of the array from the usage inside your lambda (it only works the other way round).
By the way, without strictNullChecks the array has type undefined[], but the flag basically replaces all occurenced of undefined as a type with never which causes your example to fail since and assignment of the form const foo = []; is of type never[] with strict settings.
In order to fix this issue you have to set your initial value to {bar: [] as number[]} to explicitly type the array and it works:
const foo = [1, 2, 3].reduce((p, c) => {
p.bar.push(c);
return p;
}, {bar: [] as number[]});
document.write(`foo=${JSON.stringify(foo)}`);
never. An alternate approach that should work would be to type accumulatorpin the first line