/** * Compose the passed in functions. */ export declare function compose(f: (x: T2) => T3, g: (x: T1) => T2): (x: T1) => T3; export declare function compose(f: (x: T3) => T4, g: (x: T2) => T3, h: (x: T1) => T2): (x: T1) => T4; export declare function compose(f: (x: T4) => T5, g: (x: T3) => T4, h: (x: T2) => T3, k: (x: T1) => T2): (x: T1) => T5; /** * Create a pipe of the passed in functions. */ export declare function pipe(f: (x: T1) => T2, g: (x: T2) => T3): (x: T1) => T3; export declare function pipe(f: (x: T1) => T2, g: (x: T2) => T3, h: (x: T3) => T4): (x: T1) => T4; export declare function pipe(f: (x: T1) => T2, g: (x: T2) => T3, h: (x: T3) => T4, k: (x: T4) => T5): (x: T1) => T5; /** * Create a function that plucks a property out of an object. */ export declare const pluck: (key: K) => (obj: T) => T[K]; /** * Create a function that checks whether a plucked value is equal to the given value. */ export declare const is: (key: K, value: T[K]) => (obj: T) => boolean; /** * Create a function that checks whether a plucked value is not equal to the given value. */ export declare const isNot: (key: K, value: T[K]) => (obj: T) => boolean; /** * Same as `Boolean` but acts as a type guard/"null check". * * @todo get rid of this once Typescript supports it * @see https://github.com/Microsoft/TypeScript/pull/29955 */ export declare const Bool: (value: T) => value is Exclude; /** * Do nothing. */ export declare const noop: () => void; export declare const isEnabled: ({ enabled }: T) => boolean; export declare const isDisabled: ({ enabled }: T) => boolean; export declare const isSelected: ({ selected }: T) => boolean; export declare const isDeselected: ({ selected }: T) => boolean; export declare const isChecked: ({ checked }: T) => boolean; export declare const isUnchecked: ({ checked }: T) => boolean; export declare const isVisible: ({ visible }: T) => boolean; export declare const isInvisible: ({ visible }: T) => boolean; /** * Return the value if it's set, or the default value otherwise. */ export declare const getValueOrDefault: (value: T | undefined, defaultValue: T) => T;