Skip to content

Literal

Literal = { kind: "string"; span: Span; value: string; } | { kind: "number"; raw: string; span: Span; value: number; } | { kind: "boolean"; span: Span; value: boolean; } | DurationLiteral | { kind: "timestamp"; span: Span; value: string; }

Defined in: packages/schema/src/model.ts:1287

A value written in a filter: text, a number, true or false, a duration or a timestamp.

{ kind: "string"; span: Span; value: string; }

kind: "string"

Quoted text.

span: Span

Where it stands in the filter text.

value: string

The text, unescaped.


{ kind: "number"; raw: string; span: Span; value: number; }

kind: "number"

A number.

raw: string

The number as written, which keeps digits a number cannot hold, as for bigint and decimal fields.

span: Span

Where it stands in the filter text.

value: number

The number.


{ kind: "boolean"; span: Span; value: boolean; }

kind: "boolean"

true or false.

span: Span

Where it stands in the filter text.

value: boolean

The value.


DurationLiteral


{ kind: "timestamp"; span: Span; value: string; }

kind: "timestamp"

An RFC 3339 timestamp.

span: Span

Where it stands in the filter text.

value: string

The timestamp as written.