import { mergeOptions } from './helpers'; import { ServerData } from './data'; /** * Determines the parameters that the hooks can take. */ export interface HookParams { /** * Determines the data of the hook. */ data: D; /** * Passes a merge option. */ merge: typeof mergeOptions; /** * Determines the server data in case * extra information is needed. */ server: ServerData; } /** * Determines a hook type. */ export declare type Hook = (params: HookParams) => D; /** * Determines the interface of a hook * constructor. */ export interface isHook { new (): Hooks; } /** * Represents the hooks of the chart. */ export declare class Hooks { /** * Stores the hooks. */ hooks: Hook[]; /** * Appends a custom hook */ custom(hook: Hook): this; /** * Merges the given options to the chart. */ options(options: D): this; /** * Merges the given hooks with the current ones. */ merge(other: Hooks): this; }