MCPcopy
hub / github.com/google/mangle / NewOpt

Function NewOpt

symbols/typeexprs.go:91–93  ·  view source on GitHub ↗

NewOpt wraps a label-type pair inside a StructType. fn:optional(/foo, /string)

(label, tpe ast.BaseTerm)

Source from the content-addressed store, hash-verified

89// NewOpt wraps a label-type pair inside a StructType.
90// fn:optional(/foo, /string)
91func NewOpt(label, tpe ast.BaseTerm) ast.ApplyFn {
92 return newTypeExpr(Optional, label, tpe)
93}
94
95// NewStructType returns a new StructType.
96func NewStructType(args ...ast.BaseTerm) ast.ApplyFn {

Callers 2

TestSetConformsFunction · 0.85
TestAccessFunction · 0.85

Calls 1

newTypeExprFunction · 0.85

Tested by 2

TestSetConformsFunction · 0.68
TestAccessFunction · 0.68