Skip to main content
Version: v1.14.0

typeunder

Function

typeunder the underlying type of a value

Synopsis

typeunder(val: any) -> type

Description

The typeunder function returns the type of its argument val. If this type is a named type, then the referenced type is returned instead of the named type.

Examples

echo  '{which:"chocolate"}(=flavor)' | zq -z 'yield {typeof:typeof(this),typeunder:typeunder(this)}' -

=>

{typeof:<flavor={which:string}>,typeunder:<{which:string}>}