import type { AnyRecord } from '../Shared/Types.js';
/**
 * Generic callback function.
 *
 * @callback Highcharts.Callback
 *
 * @param {TScope} this
 * The context for the callback.
 *
 * @return {TReturn}
 * Return value.
 */
export interface Callback<TScope, TReturn> {
    (this: TScope): TReturn;
}
/**
 * Generic event callback function.
 *
 * @callback Highcharts.EventCallback
 *
 * @param {TScope} this
 * The context for the callback.
 *
 * @param {TEvent} e
 * Event argument.
 *
 * @param {TScope} [ctx]
 * The context for the callback.
 *
 * @return {boolean|void}
 * Return value.
 */
export interface EventCallback<TScope, TEvent = AnyRecord | Event> {
    (this: TScope, e: TEvent, ctx?: TScope): (boolean | void);
}
/**
 * Generic formatter callback function.
 *
 * @callback Highcharts.FormatterCallback
 *
 * @param {TScope} this
 * The context for the callback.
 *
 * @param {TEvent} e
 * Event argument.
 *
 * @param {TScope} [ctx]
 * The context for the callback.
 *
 * @return {string}
 * Return value.
 */
export interface FormatterCallback<TScope, TEvent = unknown> {
    (this: TScope, e: TEvent, ctx?: TScope): string;
}
export default Callback;
