Skip to main content Link Search Menu Expand Document (external link)

ValidationError overview

Added in v1.0.0


Table of contents


constructors

commandMismatch

Signature

export declare const commandMismatch: (error: HelpDoc) => ValidationError

Added in v1.0.0

correctedFlag

Signature

export declare const correctedFlag: (error: HelpDoc) => ValidationError

Added in v1.0.0

helpRequested

Signature

export declare const helpRequested: <A>(command: Command<A>) => ValidationError

Added in v1.0.0

invalidArgument

Signature

export declare const invalidArgument: (error: HelpDoc) => ValidationError

Added in v1.0.0

invalidValue

Signature

export declare const invalidValue: (error: HelpDoc) => ValidationError

Added in v1.0.0

keyValuesDetected

Signature

export declare const keyValuesDetected: (error: HelpDoc, keyValues: ReadonlyArray<string>) => ValidationError

Added in v1.0.0

missingFlag

Signature

export declare const missingFlag: (error: HelpDoc) => ValidationError

Added in v1.0.0

missingSubcommand

Signature

export declare const missingSubcommand: (error: HelpDoc) => ValidationError

Added in v1.0.0

missingValue

Signature

export declare const missingValue: (error: HelpDoc) => ValidationError

Added in v1.0.0

noBuiltInMatch

Signature

export declare const noBuiltInMatch: (error: HelpDoc) => ValidationError

Added in v1.0.0

unclusteredFlag

Signature

export declare const unclusteredFlag: (
  error: HelpDoc,
  unclustered: ReadonlyArray<string>,
  rest: ReadonlyArray<string>
) => ValidationError

Added in v1.0.0

models

CommandMismatch (interface)

Signature

export interface CommandMismatch extends ValidationError.Proto {
  readonly _tag: "CommandMismatch"
  readonly error: HelpDoc
}

Added in v1.0.0

CorrectedFlag (interface)

Signature

export interface CorrectedFlag extends ValidationError.Proto {
  readonly _tag: "CorrectedFlag"
  readonly error: HelpDoc
}

Added in v1.0.0

HelpRequested (interface)

Signature

export interface HelpRequested extends ValidationError.Proto {
  readonly _tag: "HelpRequested"
  readonly error: HelpDoc
  readonly command: CommandDescriptor.Command<unknown>
}

Added in v1.0.0

InvalidArgument (interface)

Signature

export interface InvalidArgument extends ValidationError.Proto {
  readonly _tag: "InvalidArgument"
  readonly error: HelpDoc
}

Added in v1.0.0

InvalidValue (interface)

Signature

export interface InvalidValue extends ValidationError.Proto {
  readonly _tag: "InvalidValue"
  readonly error: HelpDoc
}

Added in v1.0.0

MissingFlag (interface)

Signature

export interface MissingFlag extends ValidationError.Proto {
  readonly _tag: "MissingFlag"
  readonly error: HelpDoc
}

Added in v1.0.0

MissingSubcommand (interface)

Signature

export interface MissingSubcommand extends ValidationError.Proto {
  readonly _tag: "MissingSubcommand"
  readonly error: HelpDoc
}

Added in v1.0.0

MissingValue (interface)

Signature

export interface MissingValue extends ValidationError.Proto {
  readonly _tag: "MissingValue"
  readonly error: HelpDoc
}

Added in v1.0.0

MultipleValuesDetected (interface)

Signature

export interface MultipleValuesDetected extends ValidationError.Proto {
  readonly _tag: "MultipleValuesDetected"
  readonly error: HelpDoc
  readonly values: ReadonlyArray<string>
}

Added in v1.0.0

NoBuiltInMatch (interface)

Signature

export interface NoBuiltInMatch extends ValidationError.Proto {
  readonly _tag: "NoBuiltInMatch"
  readonly error: HelpDoc
}

Added in v1.0.0

UnclusteredFlag (interface)

Signature

export interface UnclusteredFlag extends ValidationError.Proto {
  readonly _tag: "UnclusteredFlag"
  readonly error: HelpDoc
  readonly unclustered: ReadonlyArray<string>
  readonly rest: ReadonlyArray<string>
}

Added in v1.0.0

ValidationError (type alias)

Signature

export type ValidationError =
  | CommandMismatch
  | CorrectedFlag
  | HelpRequested
  | InvalidArgument
  | InvalidValue
  | MissingValue
  | MissingFlag
  | MultipleValuesDetected
  | MissingSubcommand
  | NoBuiltInMatch
  | UnclusteredFlag

Added in v1.0.0

refinements

isCommandMismatch

Signature

export declare const isCommandMismatch: (self: ValidationError) => self is CommandMismatch

Added in v1.0.0

isCorrectedFlag

Signature

export declare const isCorrectedFlag: (self: ValidationError) => self is CorrectedFlag

Added in v1.0.0

isHelpRequested

Signature

export declare const isHelpRequested: (self: ValidationError) => self is HelpRequested

Added in v1.0.0

isInvalidArgument

Signature

export declare const isInvalidArgument: (self: ValidationError) => self is InvalidArgument

Added in v1.0.0

isInvalidValue

Signature

export declare const isInvalidValue: (self: ValidationError) => self is InvalidValue

Added in v1.0.0

isMissingFlag

Signature

export declare const isMissingFlag: (self: ValidationError) => self is MissingFlag

Added in v1.0.0

isMissingSubcommand

Signature

export declare const isMissingSubcommand: (self: ValidationError) => self is MissingSubcommand

Added in v1.0.0

isMissingValue

Signature

export declare const isMissingValue: (self: ValidationError) => self is MissingValue

Added in v1.0.0

isMultipleValuesDetected

Signature

export declare const isMultipleValuesDetected: (self: ValidationError) => self is MultipleValuesDetected

Added in v1.0.0

isNoBuiltInMatch

Signature

export declare const isNoBuiltInMatch: (self: ValidationError) => self is NoBuiltInMatch

Added in v1.0.0

isUnclusteredFlag

Signature

export declare const isUnclusteredFlag: (self: ValidationError) => self is UnclusteredFlag

Added in v1.0.0

isValidationError

Signature

export declare const isValidationError: (u: unknown) => u is ValidationError

Added in v1.0.0

symbols

ValidationErrorTypeId

Signature

export declare const ValidationErrorTypeId: typeof ValidationErrorTypeId

Added in v1.0.0

ValidationErrorTypeId (type alias)

Signature

export type ValidationErrorTypeId = typeof ValidationErrorTypeId

Added in v1.0.0

utils

ValidationError (namespace)

Added in v1.0.0

Proto (interface)

Signature

export interface Proto {
  readonly [ValidationErrorTypeId]: ValidationErrorTypeId
}

Added in v1.0.0