UNPKG

@bianic-ui/utils

Version:

Common utilties and types for Bianic UI

10 lines (9 loc) 590 B
import memoize from "memoize-one"; import { FunctionArguments } from "./types"; export declare function runIfFn<T, U>(valueOrFn: T | ((...args: U[]) => T), ...args: U[]): T; export declare function callAllHandlers<T extends (event: any) => void>(...fns: (T | undefined)[]): (event: FunctionArguments<T>[0]) => void; export { memoize }; export declare function once(fn?: Function | null): (this: any, ...args: any[]) => any; export declare const noop: () => void; export declare const warn: (this: any, ...args: any[]) => any; export declare const error: (this: any, ...args: any[]) => any;