devextreme
Version:
HTML5 JavaScript Component Suite for Responsive Web Development
39 lines (30 loc) • 1.6 kB
TypeScript
/**
* DevExtreme (core/utils/callbacks.d.ts)
* Version: 24.2.6
* Build date: Mon Mar 17 2025
*
* Copyright (c) 2012 - 2025 Developer Express Inc. ALL RIGHTS RESERVED
* Read about DevExtreme licensing here: https://js.devexpress.com/Licensing/
*/
/**
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution.
*/
type CallbackType<TArgs extends any[], TContext>
= ((this: TContext, ...args: TArgs) => boolean)
| ((this: TContext, ...args: TArgs) => void);
/**
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution.
*/
export interface Callback<TArgs extends any[] = any[], TContext = any> {
add(fn: CallbackType<TArgs, TContext>): this;
remove(fn: CallbackType<TArgs, TContext>): this;
has(fn: CallbackType<TArgs, TContext>): this;
empty(): this;
fireWith(context: TContext, args: TArgs): this;
fire(...args: TArgs): this;
fired(): boolean;
}
/**
* @deprecated Attention! This type is for internal purposes only. If you used it previously, please submit a ticket to our {@link https://supportcenter.devexpress.com/ticket/create Support Center}. We will check if there is an alternative solution.
*/
export default function createCallback<TArgs extends any[]>(options?): Callback<TArgs>;