parseEnum static method
This static function can be used to create a function that parses a string into an enumerated value, given the class that the enumeration values are defined on and a default value if the string cannot be parsed successfully.
The normal usage is to pass the result of this function as the conversion function of a Binding.
linktemplate.bind(new go.Binding('routing', 'dataPropName', go.Binding.parseEnum(go.Link, go.Link.Normal)));
This binding will try to parse the string that is the value of the bound data's "dataPropName" property. If it is a legitimate enumerated value defined on the Link class, the conversion function will return that value. If the bound data's "dataPropName" property is not present or has an unrecognized value, the Link#routing property gets the default value, Link.Normal.
Implementation
static _i3.EnumValue Function(_i2.String) parseEnum(
_i3.EnumValue defval, [
_i2.dynamic ctor,
]) =>
(_i2.String p0) => _i4.callMethod(
_i4.callMethod(
_declaredBinding,
'parseEnum',
[
ctor,
defval,
],
),
r'call',
[
_declaredBinding,
p0,
],
);