Skip to main content

EnumType <Values>

Hierarchy

  • _EnumType
    • EnumType

Index

Constructors

publicconstructor

  • Type parameters

    • Values: unknown[] = string[]

    Parameters

    Returns EnumType<Values>

Properties

public_attributes

_attributes: { generic: GenericAttributes; typescript: TypescriptAttributes } = ...

Type declaration

  • generic: GenericAttributes
  • typescript: TypescriptAttributes

publicoptional_canReference

_canReference?: boolean

publicoptional_children

_children?: Node[]

publicoptional_connections

_connections?: Node[]

public_definition

_definition: ThereforeNodeDefinition<Values[number]> = {}

publicoptional_hooks

_hooks?: Hooks

public_id

_id: string = ...

public_isCommutative

_isCommutative: boolean = true

public_isNamed

_isNamed: false = ...

publicoptional_name

_name?: string

public_options

_options: object = {}

publicoptional_sourcePath

_sourcePath?: string

publicoptional_transform

_transform?: { aliasName?: (name: string) => string; referenceName?: (name: string) => string; symbolName?: (name: string) => string }

Type declaration

  • optionalaliasName?: (name: string) => string
      • (name: string): string
      • Parameters

        • name: string

        Returns string

  • optionalreferenceName?: (name: string) => string
      • (name: string): string
      • Parameters

        • name: string

        Returns string

  • optionalsymbolName?: (name: string) => string
      • (name: string): string
      • Parameters

        • name: string

        Returns string

public_type

_type: enum = ...

publicenum

enum: Values

publicinfer

infer: Values[number]

publicinput

input: Values[number]

Accessors

public_output

  • get _output(): (TypescriptOutput | GenericOutput)[]
  • Returns (TypescriptOutput | GenericOutput)[]

Methods

publicarray

publiccompile

  • compile(__namedParameters?: { formats?: boolean }): Schema<Values[number]>
  • Parameters

    • __namedParameters: { formats?: boolean } = {}
      • optionalformats: boolean = true

    Returns Schema<Values[number]>

publicdefault

  • default(value: Values[number]): DefaultType<EnumType<Values>>
  • Parameters

    • value: Values[number]

    Returns DefaultType<EnumType<Values>>

publicdescribe

  • describe(description: string): this
  • Parameters

    • description: string

    Returns this

publicjsonschema

  • jsonschema(schema: JsonSchema<Values[number]>): this
  • Parameters

    • schema: JsonSchema<Values[number]>

    Returns this

publicnullable

  • nullable(): NullableType<EnumType<Values>>
  • Returns NullableType<EnumType<Values>>

publicoptional

  • optional(): OptionalType<EnumType<Values>>
  • Returns OptionalType<EnumType<Values>>

publicreference

publicvalidator

  • validator(validator?: Partial<ValidatorOptions>): this
  • Parameters

    • validator: Partial<ValidatorOptions> = {}

    Returns this