Not sure what is going on here. Did I do something weird with my types...
const reflect = (promise): Promise<Reflection> =>
promise.then(
(value) => ({ value, resolved: true }),
(error) => ({ error, rejected: true })
);
const to = (promiseArr) => {
return Promise.all(promiseArr.map(reflect)).then((sources: Reflection[]) => sources);
};
Argument of type '(sources: Reflection[]) => Reflection[]' is not assignable to parameter of type '(value: [unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown]) => Reflection[] | PromiseLike<Reflection[]>'.
Types of parameters 'sources' and 'value' are incompatible.
Type '[unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown, unknown]' is not assignable to type 'Reflection[]'.
Type 'unknown' is not assignable to type 'Reflection'.ts(2345)