ConfigError
Constructors
Signature
declare const And: (self: ConfigError, that: ConfigError) => ConfigErrorInvalidData
Added in v2.0.0
Source
Signature
declare const InvalidData: (path: Array<string>, message: string, options?: Options) => ConfigErrorMissingData
Added in v2.0.0
Source
Signature
declare const MissingData: (path: Array<string>, message: string, options?: Options) => ConfigErrorSignature
declare const Or: (self: ConfigError, that: ConfigError) => ConfigErrorUnsupported
Added in v2.0.0
Source
Signature
declare const Unsupported: (path: Array<string>, message: string, options?: Options) => ConfigErrorFolding
reduceWithContext
Added in v2.0.0
Source
Signature
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;}Models
Signature
interface And extends Proto { readonly _op: "And"; readonly left: ConfigError; readonly message: string; readonly right: ConfigError;}ConfigError type
Added in v2.0.0
Source
The possible ways that loading configuration data may fail.
Signature
type ConfigError = And | Or | InvalidData | MissingData | SourceUnavailable | UnsupportedConfigErrorReducer interface
Added in v2.0.0
Source
Signature
interface ConfigErrorReducer<in C, in out Z> { andCase(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; orCase(context: C, left: Z, right: Z): Z; sourceUnavailableCase(context: C, path: Array<string>, message: string, cause: Cause<unknown>): Z; unsupportedCase(context: C, path: Array<string>, message: string): Z;}InvalidData interface
Added in v2.0.0
Source
Signature
interface InvalidData extends Proto { readonly _op: "InvalidData"; readonly message: string; readonly path: Array<string>;}MissingData interface
Added in v2.0.0
Source
Signature
interface MissingData extends Proto { readonly _op: "MissingData"; readonly message: string; readonly path: Array<string>;}Signature
interface Options { readonly pathDelim: string;}Signature
interface Or extends Proto { readonly _op: "Or"; readonly left: ConfigError; readonly message: string; readonly right: ConfigError;}Unsupported interface
Added in v2.0.0
Source
Signature
interface Unsupported extends Proto { readonly _op: "Unsupported"; readonly message: string; readonly path: Array<string>;}Other
ConfigError
Added in v2.0.0
Source
isMissingDataOnly
Added in v2.0.0
Source
Returns true if the specified ConfigError contains only MissingData errors, false otherwise.
Signature
declare const isMissingDataOnly: (self: ConfigError) => booleanRefinements
Returns true if the specified ConfigError is an And, false otherwise.
Signature
declare const isAnd: (self: ConfigError) => self is AndisConfigError
Added in v2.0.0
Source
Returns true if the specified value is a ConfigError, false otherwise.
Signature
declare const isConfigError: (u: unknown) => u is ConfigErrorisInvalidData
Added in v2.0.0
Source
Returns true if the specified ConfigError is an InvalidData, false
otherwise.
Signature
declare const isInvalidData: (self: ConfigError) => self is InvalidDataisMissingData
Added in v2.0.0
Source
Returns true if the specified ConfigError is an MissingData, false
otherwise.
Signature
declare const isMissingData: (self: ConfigError) => self is MissingDataReturns true if the specified ConfigError is an Or, false otherwise.
Signature
declare const isOr: (self: ConfigError) => self is OrisUnsupported
Added in v2.0.0
Source
Returns true if the specified ConfigError is an Unsupported, false
otherwise.
Signature
declare const isUnsupported: (self: ConfigError) => self is UnsupportedSymbols
ConfigErrorTypeId
Added in v2.0.0
Source
Signature
declare const ConfigErrorTypeId: unique symbolConfigErrorTypeId type
Added in v2.0.0
Source
Signature
type ConfigErrorTypeId = typeof ConfigErrorTypeId