import { EastFunction, IfNullFunction, Variable } from '../functions'; import { EastTypeOf, NonNullable, Nullable, PrimitiveValue } from '../types'; /** * Return x1 of predicate is null, or x2 otherwise * * @param input the nullable {@link Expression} to test * @param out_null the return value if `input` is `null` * @param out_value a function of `value` to evaluate if `input` is not `null` (defaults to `value => value`) * * @category Expression * * @example * ```typescript * // if name is null, replace with 'Unknown' string * IfNull( * name, * Const('Unknown') * ) * // if name is null, replace with 'UNKNOWN' string, otherwise make it uppercase * IfNull( * name, * Const('UNKNOWN'), * non_null_name => UpperCase(non_null_name) * ) * ``` */ export declare function IfNull>) => EastFunction>(input: EastFunction, out_null: N, out_value: V & ((EastTypeOf & ReturnType["type"]) extends never ? never : unknown)): IfNullFunction> & IfNullFunction["type"]>; export declare function IfNull>) => EastFunction>(input: EastFunction, out_null: N, out_value: V & ((N["type"] & ReturnType["type"]) extends never ? never : unknown)): IfNullFunction & IfNullFunction["type"]>; export declare function IfNull(input: EastFunction, out_null: N & ((EastTypeOf & T) extends never ? never : unknown)): IfNullFunction> & IfNullFunction>; export declare function IfNull(input: EastFunction, out_null: N & ((N["type"] & T) extends never ? never : unknown)): IfNullFunction>;