[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'.
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.