/** * The kind for all {@link EffectError} values. */ export declare const effectErrorKind = "$RXS_ERROR"; /** * Representing the error-case of an {@link EffectResult} */ export type EffectError = { kind: typeof effectErrorKind; error: E; }; /** * A factory for {@link EffectError} */ export declare const toEffectError: (error: E) => EffectError; /** * Get the concrete error-type of an {@link EffectError} */ export type ToEffectErrorType = T extends EffectError ? E : never; /** * Get the concrete success-type of an {@link EffectResult} */ export type ToEffectSuccessType = T extends EffectResult ? I : never; /** * Typeguard to check if {@link EffectError} */ export declare const isEffectError: (value: any) => value is EffectError; /** * Typeguard to check if not {@link EffectError} */ export declare const isNotEffectError: >(value: X) => value is Exclude>; /** * Map from concrete error-type to `EffectError`. * Everything except for never will be wrapped to an `EffectError` */ export type ToEffectError = E extends never ? never : EffectError; /** * The result type for rx-signals effects, representing result-type `T` or effect-error `EffectError`. * If `E extends never`, `EffectResult` will be `T`. */ export type EffectResult = T | ToEffectError;