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
[tsserver 2769] [E] No overload matches this call.
Overload 1 of 6, '(_transformations: Placeholder, object: T): evolve_01<unknown, T>', gave the following error.
Argument of type '{ price: Morphism<string | null, number | null>; track: Morphism<boolean, "ON" | "OFF">; }' is not assignable to parameter of type 'Placeholder'.
Property '"@@functional/placeholder"' is missing in type '{ price: Morphism<string | null, number | null>; track: Morphism<boolean, "ON" | "OFF">; }' but required in type 'Placeholder'.
Overload 2 of 6, '(transformations: Evolver<{ price: number | null; track: "ON" | "OFF"; }>, object: { price: number | null; track: "ON" | "OFF"; }): { price: number | null; track: "ON" | "OFF"; }', gave the following error.
Argument of type '{ price: Morphism<string | null, number | null>; track: Morphism<boolean, "ON" | "OFF">; }' is not assignable to parameter of type 'Evolver<{ price: number | null; track: "ON" | "OFF"; }>'.
Type '{ price: Morphism<string | null, number | null>; track: Morphism<boolean, "ON" | "OFF">; }' is not assignable to type '{ price?: number | Morphism<number | null, number | null> | null | undefined; track?: "ON" | "OFF" | Morphism<"ON" | "OFF", "ON" | "OFF"> | undefined; }'.
Types of property 'price' are incompatible.
Type 'Morphism<string | null, number | null>' is not assignable to type 'number | Morphism<number | null, number | null> | null | undefined'.
Type 'Morphism<string | null, number | null>' is not assignable to type 'Morphism<number | null, number | null>'.
Type 'number | null' is not assignable to type 'string | null'.
Type 'number' is not assignable to type 'string | null'.
Any ideas about what is going wrong here?
Thanks.
The text was updated successfully, but these errors were encountered:
Hi there,
I'm having issues trying to type the
evolve
method when the properties' type changes. E.g.string
changes tonumber
as seen below:Trying to type the
transformations
object with:gives this error back
Any ideas about what is going wrong here?
Thanks.
The text was updated successfully, but these errors were encountered: