UNPKG

react-application-core

Version:

A react-based application core for the business applications.

49 lines (48 loc) 2.22 kB
/** * @stable [21.12.2020] * @param condition * @param result */ export declare const orNull: <TResult>(condition: unknown, result: TResult | (() => TResult)) => TResult; /** * @stable [10.08.2019] * @param {TValue} value * @param {(value: TValue) => TResult} callback * @param {any} defaultValue * @returns {TResult} */ export declare const ifNotNilThanValue: <TValue, TResult>(value: TValue, callback: (value: TValue) => TResult, defaultValue?: any) => TResult; /** * @stable [11.12.2020] * @param value * @param callback * @param defaultValue */ export declare const ifNotEmptyThanValue: <TValue, TResult>(value: TValue, callback: (value: TValue) => TResult, defaultValue?: any) => TResult; /** * @stable [11.12.2020] * @param value * @param callback * @param defaultValue */ export declare const ifNotFalseThanValue: <TResult>(value: boolean, callback: (value: boolean) => TResult, defaultValue?: any) => TResult; /** * @stable [29.03.2019] * @param {boolean} value * @param {(value: boolean) => TResult} callback * @param {any} defaultValue * @returns {TResult} */ export declare const ifNotTrueThanValue: <TResult>(value: boolean, callback: (value: boolean) => TResult, defaultValue?: any) => TResult; /** * @stable [16.05.2020] */ export declare class ConditionUtils { static readonly ifNilThanValue: <TValue, TResult>(value: TValue, callback: (value: TValue) => TResult, defaultValue?: any) => TResult; static readonly ifNotEmptyThanValue: <TValue, TResult>(value: TValue, callback: (value: TValue) => TResult, defaultValue?: any) => TResult; static readonly ifNotFalseThanValue: <TResult>(value: boolean, callback: (value: boolean) => TResult, defaultValue?: any) => TResult; static readonly ifNotNilThanValue: <TValue, TResult>(value: TValue, callback: (value: TValue) => TResult, defaultValue?: any) => TResult; static readonly orEmpty: (condition: unknown, result: string | (() => string)) => string; static readonly orNull: <TResult>(condition: unknown, result: TResult | (() => TResult)) => TResult; static readonly orUndef: <TResult>(condition: unknown, result: TResult | (() => TResult)) => TResult; }