IfExists type

Pattern for optionally present fields.

Example

({"a": 1}) =~ ({"a": Any, "b": IfExists(Int)})
({"a": 1, "b": 2}) =~ ({"a": Any, "b": IfExists(Int)})
({"a": 1, "b": "x"}) !~ ({"a": Any, "b": IfExists(Int)})

Methods

=~(x:Any, ie:IfExists, mc:MatchContext) Source: stdlib.ngs:1180
Undocumented
init(ie:IfExists, pattern:Any) Source: stdlib.ngs:1179
Undocumented