Skip to content
Advertisement

Tag: union-types

Using union type as function parameter

I have a type defined like so: where FieldValue is a union of types: I have a variable object where I then declare the functions set by the above types: This produces an error where the values in the object are not of type FieldToAction, I kind of understand why since I am now constraining the parameter to be a

Advertisement