titus.genpy.wrapAsUnion

titus.genpy.wrapAsUnion(expr, typeName)[source]

Converts a bare expression to a tagged union with a given type name.

Parameters:
  • expr (any) – PFA value
  • typeName (string) – name for the type tag
Return type:

dict with one key-value pair

Returns:

tagged PFA value