UNPKG

@antv/g2

Version:

the Grammar of Graphics in Javascript

31 lines (30 loc) 1.81 kB
import { DisplayObject } from '@antv/g'; export declare function identity<T>(x: T): T; type Func<R> = (x: R, ...args: any[]) => R; /** * Composes functions from left to right. */ export declare function compose<R>(fns: Func<R>[]): Func<R>; /** * Composes single-argument async functions from left to right. */ export declare function composeAsync<R>(fns: ((x: R) => Promise<R> | R)[]): (x: R) => Promise<R> | R; export declare function capitalizeFirst(str: string): string; export declare function error(message?: string): never; export declare function copyAttributes(target: DisplayObject, source: DisplayObject): void; export declare function defined(x: any): boolean; export declare function random(a: number, b: number): number; export declare function useMemo<T = unknown, U = unknown>(compute: (key: T) => U): (key: T) => U; export declare function appendTransform(node: DisplayObject, transform: any): void; export declare function subObject(obj: Record<string, any>, prefix: string): Record<string, any>; export declare function maybeSubObject(obj: Record<string, any>, prefix: string): Record<string, any>; export declare function prefixObject(obj: Record<string, any>, prefix: string): Record<string, any>; export declare function filterPrefixObject(obj: Record<string, any>, prefix: string[]): Record<string, any>; export declare function omitPrefixObject(obj: Record<string, any>, ...prefixes: string[]): { [k: string]: any; }; export declare function maybePercentage(x: number | string, size: number): number; export declare function isStrictObject(d: any): boolean; export declare function isUnset(value: any): boolean; export declare function deepAssign(dist: Record<string, unknown>, src: Record<string, unknown>, maxLevel?: number, level?: number): Record<string, unknown>; export {};