Skip to content

Commit 7fc59ee

Browse files
author
Ruslan Farkhutdinov
committed
Validator: Remove generic type
1 parent b2c3ff3 commit 7fc59ee

2 files changed

Lines changed: 14 additions & 16 deletions

File tree

packages/devextreme/js/common.d.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export type ApplyValueMode = 'instantly' | 'useButtons';
2929
* @namespace DevExpress.common
3030
* @type object
3131
*/
32-
export type AsyncRule<TValue = unknown> = {
32+
export type AsyncRule = {
3333
/**
3434
* @docid
3535
* @default false
@@ -58,15 +58,15 @@ export type AsyncRule<TValue = unknown> = {
5858
* @docid
5959
* @type_function_return Promise<any>
6060
* @type_function_param1 options:object
61-
* @type_function_param1_field value:unknown
61+
* @type_function_param1_field value:any
6262
* @type_function_param1_field rule:object
6363
* @type_function_param1_field validator:object
6464
* @type_function_param1_field data:object
6565
* @type_function_param1_field column:object
6666
* @type_function_param1_field formItem:object
6767
* @public
6868
*/
69-
validationCallback?: ((options: ValidationCallbackData<TValue>) => PromiseLike<any>);
69+
validationCallback?: ((options: ValidationCallbackData) => PromiseLike<any>);
7070
};
7171

7272
/**
@@ -132,7 +132,7 @@ export type ComparisonOperator = '!=' | '!==' | '<' | '<=' | '==' | '===' | '>'
132132
* @type object
133133
* @namespace DevExpress.common
134134
*/
135-
export type CustomRule<TValue = unknown> = {
135+
export type CustomRule = {
136136
/**
137137
* @docid
138138
* @default false
@@ -160,15 +160,15 @@ export type CustomRule<TValue = unknown> = {
160160
/**
161161
* @docid
162162
* @type_function_param1 options:object
163-
* @type_function_param1_field value:unknown
163+
* @type_function_param1_field value:any
164164
* @type_function_param1_field rule:object
165165
* @type_function_param1_field validator:object
166166
* @type_function_param1_field data:object
167167
* @type_function_param1_field column:object
168168
* @type_function_param1_field formItem:object
169169
* @public
170170
*/
171-
validationCallback?: ((options: ValidationCallbackData<TValue>) => boolean);
171+
validationCallback?: ((options: ValidationCallbackData) => boolean);
172172
};
173173

174174
/**
@@ -815,8 +815,8 @@ export type TooltipShowMode = 'always' | 'onHover';
815815
* @public
816816
* @namespace DevExpress.common
817817
*/
818-
export type ValidationCallbackData<TValue = unknown> = {
819-
value?: TValue;
818+
export type ValidationCallbackData = {
819+
value?: any;
820820
rule: any;
821821
validator: any;
822822
data?: any;

packages/devextreme/ts/dx.all.d.ts

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,7 +1168,7 @@ declare module DevExpress.common {
11681168
/**
11691169
* [descr:AsyncRule]
11701170
*/
1171-
export type AsyncRule<TValue = unknown> = {
1171+
export type AsyncRule = {
11721172
/**
11731173
* [descr:AsyncRule.ignoreEmptyValue]
11741174
*/
@@ -1188,9 +1188,7 @@ declare module DevExpress.common {
11881188
/**
11891189
* [descr:AsyncRule.validationCallback]
11901190
*/
1191-
validationCallback?: (
1192-
options: ValidationCallbackData<TValue>
1193-
) => PromiseLike<any>;
1191+
validationCallback?: (options: ValidationCallbackData) => PromiseLike<any>;
11941192
};
11951193
export type ButtonStyle = 'text' | 'outlined' | 'contained';
11961194
export type ButtonType = 'danger' | 'default' | 'normal' | 'success';
@@ -1231,7 +1229,7 @@ declare module DevExpress.common {
12311229
/**
12321230
* [descr:CustomRule]
12331231
*/
1234-
export type CustomRule<TValue = unknown> = {
1232+
export type CustomRule = {
12351233
/**
12361234
* [descr:CustomRule.ignoreEmptyValue]
12371235
*/
@@ -1251,7 +1249,7 @@ declare module DevExpress.common {
12511249
/**
12521250
* [descr:CustomRule.validationCallback]
12531251
*/
1254-
validationCallback?: (options: ValidationCallbackData<TValue>) => boolean;
1252+
validationCallback?: (options: ValidationCallbackData) => boolean;
12551253
};
12561254
/**
12571255
* @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.
@@ -1726,8 +1724,8 @@ declare module DevExpress.common {
17261724
| 'dxTextBox';
17271725
export type ToolbarItemLocation = 'after' | 'before' | 'center';
17281726
export type TooltipShowMode = 'always' | 'onHover';
1729-
export type ValidationCallbackData<TValue = unknown> = {
1730-
value?: TValue;
1727+
export type ValidationCallbackData = {
1728+
value?: any;
17311729
rule: any;
17321730
validator: any;
17331731
data?: any;

0 commit comments

Comments
 (0)