Skip to content

Commit d94f937

Browse files
Menu: fix ts-errors (DevExpress#30483)
1 parent 45f633d commit d94f937

File tree

7 files changed

+722
-407
lines changed

7 files changed

+722
-407
lines changed

packages/devextreme/js/__internal/core/m_action.ts

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,23 @@
1-
/* eslint-disable guard-for-in */
21
/* eslint-disable @typescript-eslint/prefer-for-of */
3-
/* eslint-disable no-restricted-syntax */
2+
43
import $ from '@js/core/renderer';
54
import { each } from '@js/core/utils/iterator';
65
import { isFunction, isPlainObject } from '@js/core/utils/type';
76
import { getWindow } from '@js/core/utils/window';
87

8+
export type ActionArguments<
9+
TComponent,
10+
TEventData,
11+
> = Record<string, unknown> & TEventData & {
12+
args?: TEventData[];
13+
action: (e: TEventData) => void;
14+
context: TComponent;
15+
component: TComponent;
16+
cancel: boolean;
17+
handled: boolean;
18+
validatingTargetName?: string;
19+
};
20+
921
class Action {
1022
_action: any;
1123

@@ -81,7 +93,6 @@ class Action {
8193
const excludeValidators = this._excludeValidators;
8294
const { executors } = Action;
8395

84-
// eslint-disable-next-line no-restricted-syntax
8596
for (const name in executors) {
8697
if (!excludeValidators[name]) {
8798
const executor = executors[name];

0 commit comments

Comments
 (0)