You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error TS2345: Argument of type '((data: { x: number; }[]) => { x: number; }[]) | ((data: { x: number; }[]) => Point[])' is not assignable to parameter of type '(input: { x: number; }[]) => { x: number; }[]'.
Type '(data: { x: number; }[]) => Point[]' is not assignable to type '(input: { x: number; }[]) => { x: number; }[]'.
Type 'Point[]' is not assignable to type '{ x: number; }[]'.
Type 'Point' is not assignable to type '{ x: number; }'.
Types of property 'x' are incompatible.
Type 'number | undefined' is not assignable to type 'number'.
Type 'undefined' is not assignable to type 'number'.
16 modify
~~~~~~
17 ? map(modify)
~~~~~~~~~~~~~~~~~~~
18 : map((point) => point),
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
yet another little difference
(types are mostly copied from
remeda
)TS 5.8 is OK with that: playground
If we merge
{ x?: number } & { y?: number }
as{ x?: number; y?: number }
the error disappears (but in my core I merge different types).The text was updated successfully, but these errors were encountered: