type TypeRef … func (r *TypeRef) HasTrait(trait int) bool { … } // TypeName returns the name of this TypeRef. func (r *TypeRef) TypeName() string { … } // Val returns an instance given the fields. func (r *TypeRef) Val(fields map[string]ref.Val) ref.Val { … } // CELType returns the type. The returned type is of TypeType type. func (r *TypeRef) CELType() *types.Type { … } // Field looks up the field by name. // This is the unstructured version that allows any name as the field name. // The returned field is of DynType type. func (r *TypeRef) Field(name string) (*types.FieldType, bool) { … } // NewTypeRef creates a TypeRef by the given field name. func NewTypeRef(name string) *TypeRef { … }