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

ConfigError overview

Added in v2.0.0


Table of contents


constructors

And

Signature

export declare const And: (self: ConfigError, that: ConfigError) => ConfigError

Added in v2.0.0

InvalidData

Signature

export declare const InvalidData: (path: Array<string>, message: string, options?: Options) => ConfigError

Added in v2.0.0

MissingData

Signature

export declare const MissingData: (path: Array<string>, message: string, options?: Options) => ConfigError

Added in v2.0.0

Or

Signature

export declare const Or: (self: ConfigError, that: ConfigError) => ConfigError

Added in v2.0.0

SourceUnavailable

Signature

export declare const SourceUnavailable: (
  path: Array<string>,
  message: string,
  cause: Cause.Cause<unknown>,
  options?: Options
) => ConfigError

Added in v2.0.0

Unsupported

Signature

export declare const Unsupported: (path: Array<string>, message: string, options?: Options) => ConfigError

Added in v2.0.0

folding

reduceWithContext

Signature

export declare const reduceWithContext: {
  <C, Z>(context: C, reducer: ConfigErrorReducer<C, Z>): (self: ConfigError) => Z
  <C, Z>(self: ConfigError, context: C, reducer: ConfigErrorReducer<C, Z>): Z
}

Added in v2.0.0

models

And (interface)

Signature

export interface And extends ConfigError.Proto {
  readonly _op: "And"
  readonly left: ConfigError
  readonly right: ConfigError
}

Added in v2.0.0

ConfigError (type alias)

The possible ways that loading configuration data may fail.

Signature

export type ConfigError = And | Or | InvalidData | MissingData | SourceUnavailable | Unsupported

Added in v2.0.0

ConfigErrorReducer (interface)

Signature

export interface ConfigErrorReducer<in C, in out Z> {
  andCase(context: C, left: Z, right: Z): Z
  orCase(context: C, left: Z, right: Z): Z
  invalidDataCase(context: C, path: Array<string>, message: string): Z
  missingDataCase(context: C, path: Array<string>, message: string): Z
  sourceUnavailableCase(context: C, path: Array<string>, message: string, cause: Cause.Cause<unknown>): Z
  unsupportedCase(context: C, path: Array<string>, message: string): Z
}

Added in v2.0.0

InvalidData (interface)

Signature

export interface InvalidData extends ConfigError.Proto {
  readonly _op: "InvalidData"
  readonly path: Array<string>
  readonly message: string
}

Added in v2.0.0

MissingData (interface)

Signature

export interface MissingData extends ConfigError.Proto {
  readonly _op: "MissingData"
  readonly path: Array<string>
  readonly message: string
}

Added in v2.0.0

Options (interface)

Signature

export interface Options {
  readonly pathDelim: string
}

Added in v2.0.0

Or (interface)

Signature

export interface Or extends ConfigError.Proto {
  readonly _op: "Or"
  readonly left: ConfigError
  readonly right: ConfigError
}

Added in v2.0.0

SourceUnavailable (interface)

Signature

export interface SourceUnavailable extends ConfigError.Proto {
  readonly _op: "SourceUnavailable"
  readonly path: Array<string>
  readonly message: string
  readonly cause: Cause.Cause<unknown>
}

Added in v2.0.0

Unsupported (interface)

Signature

export interface Unsupported extends ConfigError.Proto {
  readonly _op: "Unsupported"
  readonly path: Array<string>
  readonly message: string
}

Added in v2.0.0

refinements

isAnd

Returns true if the specified ConfigError is an And, false otherwise.

Signature

export declare const isAnd: (self: ConfigError) => self is And

Added in v2.0.0

isConfigError

Returns true if the specified value is a ConfigError, false otherwise.

Signature

export declare const isConfigError: (u: unknown) => u is ConfigError

Added in v2.0.0

isInvalidData

Returns true if the specified ConfigError is an InvalidData, false otherwise.

Signature

export declare const isInvalidData: (self: ConfigError) => self is InvalidData

Added in v2.0.0

isMissingData

Returns true if the specified ConfigError is an MissingData, false otherwise.

Signature

export declare const isMissingData: (self: ConfigError) => self is MissingData

Added in v2.0.0

isOr

Returns true if the specified ConfigError is an Or, false otherwise.

Signature

export declare const isOr: (self: ConfigError) => self is Or

Added in v2.0.0

isSourceUnavailable

Returns true if the specified ConfigError is a SourceUnavailable, false otherwise.

Signature

export declare const isSourceUnavailable: (self: ConfigError) => self is SourceUnavailable

Added in v2.0.0

isUnsupported

Returns true if the specified ConfigError is an Unsupported, false otherwise.

Signature

export declare const isUnsupported: (self: ConfigError) => self is Unsupported

Added in v2.0.0

symbols

ConfigErrorTypeId

Signature

export declare const ConfigErrorTypeId: typeof ConfigErrorTypeId

Added in v2.0.0

ConfigErrorTypeId (type alias)

Signature

export type ConfigErrorTypeId = typeof ConfigErrorTypeId

Added in v2.0.0

utils

ConfigError (namespace)

Added in v2.0.0

Proto (interface)

Signature

export interface Proto {
  readonly _tag: "ConfigError"
  readonly [ConfigErrorTypeId]: ConfigErrorTypeId
}

Added in v2.0.0

Reducer (type alias)

Signature

export type Reducer<C, Z> = ConfigErrorReducer<C, Z>

Added in v2.0.0

isMissingDataOnly

Returns true if the specified ConfigError contains only MissingData errors, false otherwise.

Signature

export declare const isMissingDataOnly: (self: ConfigError) => boolean

Added in v2.0.0

prefixed

Signature

export declare const prefixed: {
  (prefix: Array<string>): (self: ConfigError) => ConfigError
  (self: ConfigError, prefix: Array<string>): ConfigError
}

Added in v2.0.0