/** * Copied from chakra-ui, license MIT * Accessed 2021-12-26, commit July 22nd, 2021 * See also: https://github.com/chakra-ui/chakra-ui/blob/82e99e2/packages/utils/src/function.ts */ import { AnyFunction, FunctionArguments } from "./types"; export declare function runIfFn(valueOrFn: T | ((...fnArgs: U[]) => T), ...args: U[]): T; export declare function callAllHandlers void>(...fns: (T | undefined)[]): (event: FunctionArguments[0]) => void; export declare function callAll(...fns: (T | undefined)[]): (arg: FunctionArguments[0]) => void; export declare const compose: (fn1: (...args: T[]) => T, ...fns: ((...args: T[]) => T)[]) => (...args: T[]) => T; export declare function once(fn?: T | null): (this: any, ...args: Parameters) => any; export declare const noop: () => void; type MessageOptions = { condition: boolean; message: string; }; export declare const warn: (this: any, options: MessageOptions) => any; export declare const error: (this: any, options: MessageOptions) => any; export declare const pipe: (...fns: ((a: R) => R)[]) => (v: R) => R; type Point = { x: number; y: number; }; export declare function distance

(a: P, b: P): number; export {};