Skip to main content

Interface: UnionBuilder

Defined in: packages/ir/src/builder.ts:59

Type-setters shared by UnionBuilder and TypeAliasBuilder.

Extends​

Methods​

array()​

array(build): this;

Defined in: packages/ir/src/builder.ts:55

Parameters​

ParameterType
build(element) => void

Returns​

this

Inherited from​

TypeVariantBuilder.array


discriminator()​

discriminator(propertyName, mapping?): this;

Defined in: packages/ir/src/builder.ts:61

mapping values must name a ref variant of this union.

Parameters​

ParameterType
propertyNamestring
mapping?Record<string, string>

Returns​

this


enum()​

enum(ref): this;

Defined in: packages/ir/src/builder.ts:51

Parameters​

ParameterType
refstring

Returns​

this

Inherited from​

TypeVariantBuilder.enum


map()​

map(build): this;

Defined in: packages/ir/src/builder.ts:54

Parameters​

ParameterType
build(value) => void

Returns​

this

Inherited from​

TypeVariantBuilder.map


ref()​

ref(name): this;

Defined in: packages/ir/src/builder.ts:52

Parameters​

ParameterType
namestring

Returns​

this

Inherited from​

TypeVariantBuilder.ref


scalar()​

scalar(t): this;

Defined in: packages/ir/src/builder.ts:50

Parameters​

ParameterType
t| "string" | "bigint" | "boolean" | "int" | "float" | "decimal" | "date" | "datetime" | "uuid" | "bytes" | "json"

Returns​

this

Inherited from​

TypeVariantBuilder.scalar


union()​

union(build): this;

Defined in: packages/ir/src/builder.ts:53

Parameters​

ParameterType
build(u) => void

Returns​

this

Inherited from​

TypeVariantBuilder.union


unknown()​

unknown(hint?): this;

Defined in: packages/ir/src/builder.ts:56

Parameters​

ParameterType
hint?string

Returns​

this

Inherited from​

TypeVariantBuilder.unknown