Skip to content

type_of

Retrieves the type definition of an expression.

type_of(x:any) -> record

The type_of function returns the type definition of the given value x.

:::warning Subject to change This function is designed for internal use of the Tenzir Platform and its output format is subject to change without notice. :::

from {x: 1, y: "2"}
this = type_of(this)
{
name: "tenzir.from",
kind: "record",
attributes: [],
state: {
fields: [
{
name: "x",
type: {
name: null,
kind: "int64",
attributes: [],
state: null,
},
},
{
name: "y",
type: {
name: null,
kind: "string",
attributes: [],
state: null,
},
},
],
},
}

type_id