import { Dictionary, ArrayLike, KeyOfDistributive } from './types'; import { GradientObject } from '../graphic/Gradient'; import { ImagePatternObject } from '../graphic/Pattern'; declare const nativeSlice: (start?: number, end?: number) => any[]; export declare function guid(): number; export declare function logError(...args: any[]): void; export declare function clone(source: T): T; export declare function merge, S extends Dictionary>(target: T, source: S, overwrite?: boolean): T & S; export declare function merge(target: T, source: S, overwrite?: boolean): T | S; export declare function mergeAll(targetAndSources: any[], overwrite?: boolean): any; export declare function extend, S extends Dictionary>(target: T, source: S): T & S; export declare function defaults, S extends Dictionary>(target: T, source: S, overlay?: boolean): T & S; export declare const createCanvas: () => HTMLCanvasElement; export declare function indexOf(array: T[] | readonly T[] | ArrayLike, value: T): number; export declare function inherits(clazz: Function, baseClazz: Function): void; export declare function mixin(target: T | Function, source: S | Function, override?: boolean): void; export declare function isArrayLike(data: any): data is ArrayLike; export declare function each | any[] | readonly any[] | ArrayLike, Context>(arr: I, cb: (this: Context, value: I extends (infer T)[] | readonly (infer T)[] | ArrayLike ? T : I extends Dictionary ? I extends Record ? T : unknown : unknown, index?: I extends any[] | readonly any[] | ArrayLike ? number : keyof I & string, arr?: I) => void, context?: Context): void; export declare function map(arr: readonly T[], cb: (this: Context, val: T, index?: number, arr?: readonly T[]) => R, context?: Context): R[]; export declare function reduce(arr: readonly T[], cb: (this: Context, previousValue: S, currentValue: T, currentIndex?: number, arr?: readonly T[]) => S, memo?: S, context?: Context): S; export declare function filter(arr: readonly T[], cb: (this: Context, value: T, index: number, arr: readonly T[]) => boolean, context?: Context): T[]; export declare function find(arr: readonly T[], cb: (this: Context, value: T, index?: number, arr?: readonly T[]) => boolean, context?: Context): T; export declare function keys(obj: T): (KeyOfDistributive & string)[]; export declare type Bind1 = F extends (this: Ctx, ...args: infer A) => infer R ? (...args: A) => R : unknown; export declare type Bind2 = F extends (this: Ctx, a: T1, ...args: infer A) => infer R ? (...args: A) => R : unknown; export declare type Bind3 = F extends (this: Ctx, a: T1, b: T2, ...args: infer A) => infer R ? (...args: A) => R : unknown; export declare type Bind4 = F extends (this: Ctx, a: T1, b: T2, c: T3, ...args: infer A) => infer R ? (...args: A) => R : unknown; export declare type Bind5 = F extends (this: Ctx, a: T1, b: T2, c: T3, d: T4, ...args: infer A) => infer R ? (...args: A) => R : unknown; declare type BindFunc = (this: Ctx, ...arg: any[]) => any; interface FunctionBind { , Ctx>(func: F, ctx: Ctx): Bind1; , Ctx, T1 extends Parameters[0]>(func: F, ctx: Ctx, a: T1): Bind2; , Ctx, T1 extends Parameters[0], T2 extends Parameters[1]>(func: F, ctx: Ctx, a: T1, b: T2): Bind3; , Ctx, T1 extends Parameters[0], T2 extends Parameters[1], T3 extends Parameters[2]>(func: F, ctx: Ctx, a: T1, b: T2, c: T3): Bind4; , Ctx, T1 extends Parameters[0], T2 extends Parameters[1], T3 extends Parameters[2], T4 extends Parameters[3]>(func: F, ctx: Ctx, a: T1, b: T2, c: T3, d: T4): Bind5; } export declare const bind: FunctionBind; export declare type Curry1 = F extends (a: T1, ...args: infer A) => infer R ? (...args: A) => R : unknown; export declare type Curry2 = F extends (a: T1, b: T2, ...args: infer A) => infer R ? (...args: A) => R : unknown; export declare type Curry3 = F extends (a: T1, b: T2, c: T3, ...args: infer A) => infer R ? (...args: A) => R : unknown; export declare type Curry4 = F extends (a: T1, b: T2, c: T3, d: T4, ...args: infer A) => infer R ? (...args: A) => R : unknown; declare type CurryFunc = (...arg: any[]) => any; declare function curry[0]>(func: F, a: T1): Curry1; declare function curry[0], T2 extends Parameters[1]>(func: F, a: T1, b: T2): Curry2; declare function curry[0], T2 extends Parameters[1], T3 extends Parameters[2]>(func: F, a: T1, b: T2, c: T3): Curry3; declare function curry[0], T2 extends Parameters[1], T3 extends Parameters[2], T4 extends Parameters[3]>(func: F, a: T1, b: T2, c: T3, d: T4): Curry4; export { curry }; export declare function isArray(value: any): value is any[]; export declare function isFunction(value: any): value is Function; export declare function isString(value: any): value is string; export declare function isStringSafe(value: any): value is string; export declare function isNumber(value: any): value is number; export declare function isObject(value: T): value is (object & T); export declare function isBuiltInObject(value: any): boolean; export declare function isTypedArray(value: any): boolean; export declare function isDom(value: any): value is HTMLElement; export declare function isGradientObject(value: any): value is GradientObject; export declare function isImagePatternObject(value: any): value is ImagePatternObject; export declare function isRegExp(value: unknown): value is RegExp; export declare function eqNaN(value: any): boolean; export declare function retrieve(...args: T[]): T; export declare function retrieve2(value0: T, value1: R): T | R; export declare function retrieve3(value0: T, value1: R, value2: W): T | R | W; declare type SliceParams = Parameters; export declare function slice(arr: ArrayLike, ...args: SliceParams): T[]; export declare function normalizeCssArray(val: number | number[]): number[]; export declare function assert(condition: any, message?: string): void; export declare function trim(str: string): string; export declare function setAsPrimitive(obj: any): void; export declare function isPrimitive(obj: any): boolean; interface MapInterface { delete(key: KEY): boolean; has(key: KEY): boolean; get(key: KEY): T | undefined; set(key: KEY, value: T): this; keys(): KEY[]; forEach(callback: (value: T, key: KEY) => void): void; } export declare class HashMap { data: MapInterface; constructor(obj?: HashMap | { [key in KEY]?: T; } | KEY[]); hasKey(key: KEY): boolean; get(key: KEY): T; set(key: KEY, value: T): T; each(cb: (this: Context, value?: T, key?: KEY) => void, context?: Context): void; keys(): KEY[]; removeKey(key: KEY): void; } export declare function createHashMap(obj?: HashMap | { [key in KEY]?: T; } | KEY[]): HashMap; export declare function concatArray(a: ArrayLike, b: ArrayLike): ArrayLike; export declare function createObject(proto?: object, properties?: T): T; export declare function disableUserSelect(dom: HTMLElement): void; export declare function hasOwn(own: object, prop: string): boolean; export declare function noop(): void; export declare const RADIAN_TO_DEGREE: number;