Skip to content

Commit 6872f1d

Browse files
authored
d.ts - Replace [Smth]Options members of 'Function' type (smthExpr) to more specific to keep exact signature in generated wrappers (#33285)
1 parent 376f7da commit 6872f1d

53 files changed

Lines changed: 289 additions & 274 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/devextreme-angular/src/ui/accordion/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,10 +287,10 @@ export class DxAccordionComponent<TItem = any, TKey = any> extends DxComponent i
287287
288288
*/
289289
@Input()
290-
get keyExpr(): Function | string {
290+
get keyExpr(): ((item: any) => any) | string {
291291
return this._getOption('keyExpr');
292292
}
293-
set keyExpr(value: Function | string) {
293+
set keyExpr(value: ((item: any) => any) | string) {
294294
this._setOption('keyExpr', value);
295295
}
296296

@@ -634,7 +634,7 @@ export class DxAccordionComponent<TItem = any, TKey = any> extends DxComponent i
634634
* This member supports the internal infrastructure and is not intended to be used directly from your code.
635635
636636
*/
637-
@Output() keyExprChange: EventEmitter<Function | string>;
637+
@Output() keyExprChange: EventEmitter<((item: any) => any) | string>;
638638

639639
/**
640640

packages/devextreme-angular/src/ui/button-group/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,10 @@ export class DxButtonGroupComponent extends DxComponent implements OnDestroy, On
207207
208208
*/
209209
@Input()
210-
get keyExpr(): Function | string {
210+
get keyExpr(): ((item: any) => any) | string {
211211
return this._getOption('keyExpr');
212212
}
213-
set keyExpr(value: Function | string) {
213+
set keyExpr(value: ((item: any) => any) | string) {
214214
this._setOption('keyExpr', value);
215215
}
216216

@@ -441,7 +441,7 @@ export class DxButtonGroupComponent extends DxComponent implements OnDestroy, On
441441
* This member supports the internal infrastructure and is not intended to be used directly from your code.
442442
443443
*/
444-
@Output() keyExprChange: EventEmitter<Function | string>;
444+
@Output() keyExprChange: EventEmitter<((item: any) => any) | string>;
445445

446446
/**
447447

packages/devextreme-angular/src/ui/card-view/nested/tab-panel-options.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,10 @@ export class DxoCardViewTabPanelOptionsComponent extends NestedOption implements
176176
}
177177

178178
@Input()
179-
get keyExpr(): Function | string {
179+
get keyExpr(): ((item: any) => any) | string {
180180
return this._getOption('keyExpr');
181181
}
182-
set keyExpr(value: Function | string) {
182+
set keyExpr(value: ((item: any) => any) | string) {
183183
this._setOption('keyExpr', value);
184184
}
185185

packages/devextreme-angular/src/ui/chat/nested/suggestions.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,10 +126,10 @@ export class DxoChatSuggestionsComponent extends NestedOption implements OnDestr
126126
}
127127

128128
@Input()
129-
get keyExpr(): Function | string {
129+
get keyExpr(): ((item: any) => any) | string {
130130
return this._getOption('keyExpr');
131131
}
132-
set keyExpr(value: Function | string) {
132+
set keyExpr(value: ((item: any) => any) | string) {
133133
this._setOption('keyExpr', value);
134134
}
135135

packages/devextreme-angular/src/ui/context-menu/index.ts

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,10 @@ export class DxContextMenuComponent<TItem = any, TKey = any> extends DxComponent
188188
189189
*/
190190
@Input()
191-
get disabledExpr(): Function | string {
191+
get disabledExpr(): ((item: any) => boolean | undefined) | string {
192192
return this._getOption('disabledExpr');
193193
}
194-
set disabledExpr(value: Function | string) {
194+
set disabledExpr(value: ((item: any) => boolean | undefined) | string) {
195195
this._setOption('disabledExpr', value);
196196
}
197197

@@ -305,10 +305,10 @@ export class DxContextMenuComponent<TItem = any, TKey = any> extends DxComponent
305305
306306
*/
307307
@Input()
308-
get itemsExpr(): Function | string {
308+
get itemsExpr(): ((item: any) => Array<any> | undefined) | string {
309309
return this._getOption('itemsExpr');
310310
}
311-
set itemsExpr(value: Function | string) {
311+
set itemsExpr(value: ((item: any) => Array<any> | undefined) | string) {
312312
this._setOption('itemsExpr', value);
313313
}
314314

@@ -370,10 +370,10 @@ export class DxContextMenuComponent<TItem = any, TKey = any> extends DxComponent
370370
371371
*/
372372
@Input()
373-
get selectedExpr(): Function | string {
373+
get selectedExpr(): ((item: any, value: boolean | undefined) => boolean | undefined) | string {
374374
return this._getOption('selectedExpr');
375375
}
376-
set selectedExpr(value: Function | string) {
376+
set selectedExpr(value: ((item: any, value: boolean | undefined) => boolean | undefined) | string) {
377377
this._setOption('selectedExpr', value);
378378
}
379379

@@ -645,7 +645,7 @@ export class DxContextMenuComponent<TItem = any, TKey = any> extends DxComponent
645645
* This member supports the internal infrastructure and is not intended to be used directly from your code.
646646
647647
*/
648-
@Output() disabledExprChange: EventEmitter<Function | string>;
648+
@Output() disabledExprChange: EventEmitter<((item: any) => boolean | undefined) | string>;
649649

650650
/**
651651
@@ -708,7 +708,7 @@ export class DxContextMenuComponent<TItem = any, TKey = any> extends DxComponent
708708
* This member supports the internal infrastructure and is not intended to be used directly from your code.
709709
710710
*/
711-
@Output() itemsExprChange: EventEmitter<Function | string>;
711+
@Output() itemsExprChange: EventEmitter<((item: any) => Array<any> | undefined) | string>;
712712

713713
/**
714714
@@ -743,7 +743,7 @@ export class DxContextMenuComponent<TItem = any, TKey = any> extends DxComponent
743743
* This member supports the internal infrastructure and is not intended to be used directly from your code.
744744
745745
*/
746-
@Output() selectedExprChange: EventEmitter<Function | string>;
746+
@Output() selectedExprChange: EventEmitter<((item: any, value: boolean | undefined) => boolean | undefined) | string>;
747747

748748
/**
749749

packages/devextreme-angular/src/ui/data-grid/nested/tab-panel-options.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,10 @@ export class DxoDataGridTabPanelOptionsComponent extends NestedOption implements
176176
}
177177

178178
@Input()
179-
get keyExpr(): Function | string {
179+
get keyExpr(): ((item: any) => any) | string {
180180
return this._getOption('keyExpr');
181181
}
182-
set keyExpr(value: Function | string) {
182+
set keyExpr(value: ((item: any) => any) | string) {
183183
this._setOption('keyExpr', value);
184184
}
185185

packages/devextreme-angular/src/ui/form/nested/tab-panel-options.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,10 @@ export class DxoFormTabPanelOptionsComponent extends NestedOption implements OnD
176176
}
177177

178178
@Input()
179-
get keyExpr(): Function | string {
179+
get keyExpr(): ((item: any) => any) | string {
180180
return this._getOption('keyExpr');
181181
}
182-
set keyExpr(value: Function | string) {
182+
set keyExpr(value: ((item: any) => any) | string) {
183183
this._setOption('keyExpr', value);
184184
}
185185

packages/devextreme-angular/src/ui/gantt/index.ts

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -199,10 +199,10 @@ export class DxGanttComponent extends DxComponent implements OnDestroy, OnChange
199199
200200
*/
201201
@Input()
202-
get dependencies(): { dataSource?: Array<any> | DataSource | DataSourceOptions | null | Store | string, keyExpr?: Function | string, predecessorIdExpr?: Function | string, successorIdExpr?: Function | string, typeExpr?: Function | string } {
202+
get dependencies(): { dataSource?: Array<any> | DataSource | DataSourceOptions | null | Store | string, keyExpr?: ((dependency: any) => any) | string, predecessorIdExpr?: ((dependency: any, value: any) => any) | string, successorIdExpr?: ((dependency: any, value: any) => any) | string, typeExpr?: ((dependency: any, value: any) => any) | string } {
203203
return this._getOption('dependencies');
204204
}
205-
set dependencies(value: { dataSource?: Array<any> | DataSource | DataSourceOptions | null | Store | string, keyExpr?: Function | string, predecessorIdExpr?: Function | string, successorIdExpr?: Function | string, typeExpr?: Function | string }) {
205+
set dependencies(value: { dataSource?: Array<any> | DataSource | DataSourceOptions | null | Store | string, keyExpr?: ((dependency: any) => any) | string, predecessorIdExpr?: ((dependency: any, value: any) => any) | string, successorIdExpr?: ((dependency: any, value: any) => any) | string, typeExpr?: ((dependency: any, value: any) => any) | string }) {
206206
this._setOption('dependencies', value);
207207
}
208208

@@ -355,10 +355,10 @@ export class DxGanttComponent extends DxComponent implements OnDestroy, OnChange
355355
356356
*/
357357
@Input()
358-
get resourceAssignments(): { dataSource?: Array<any> | DataSource | DataSourceOptions | null | Store | string, keyExpr?: Function | string, resourceIdExpr?: Function | string, taskIdExpr?: Function | string } {
358+
get resourceAssignments(): { dataSource?: Array<any> | DataSource | DataSourceOptions | null | Store | string, keyExpr?: ((resourceAssignment: any) => any) | string, resourceIdExpr?: ((resourceAssignment: any, value: any) => any) | string, taskIdExpr?: ((resourceAssignment: any, value: any) => any) | string } {
359359
return this._getOption('resourceAssignments');
360360
}
361-
set resourceAssignments(value: { dataSource?: Array<any> | DataSource | DataSourceOptions | null | Store | string, keyExpr?: Function | string, resourceIdExpr?: Function | string, taskIdExpr?: Function | string }) {
361+
set resourceAssignments(value: { dataSource?: Array<any> | DataSource | DataSourceOptions | null | Store | string, keyExpr?: ((resourceAssignment: any) => any) | string, resourceIdExpr?: ((resourceAssignment: any, value: any) => any) | string, taskIdExpr?: ((resourceAssignment: any, value: any) => any) | string }) {
362362
this._setOption('resourceAssignments', value);
363363
}
364364

@@ -368,10 +368,10 @@ export class DxGanttComponent extends DxComponent implements OnDestroy, OnChange
368368
369369
*/
370370
@Input()
371-
get resources(): { colorExpr?: Function | string, dataSource?: Array<any> | DataSource | DataSourceOptions | null | Store | string, keyExpr?: Function | string, textExpr?: Function | string } {
371+
get resources(): { colorExpr?: ((resource: any, value: any) => any) | string, dataSource?: Array<any> | DataSource | DataSourceOptions | null | Store | string, keyExpr?: ((resource: any) => any) | string, textExpr?: ((resource: any, value: any) => string) | string } {
372372
return this._getOption('resources');
373373
}
374-
set resources(value: { colorExpr?: Function | string, dataSource?: Array<any> | DataSource | DataSourceOptions | null | Store | string, keyExpr?: Function | string, textExpr?: Function | string }) {
374+
set resources(value: { colorExpr?: ((resource: any, value: any) => any) | string, dataSource?: Array<any> | DataSource | DataSourceOptions | null | Store | string, keyExpr?: ((resource: any) => any) | string, textExpr?: ((resource: any, value: any) => string) | string }) {
375375
this._setOption('resources', value);
376376
}
377377

@@ -563,10 +563,10 @@ export class DxGanttComponent extends DxComponent implements OnDestroy, OnChange
563563
564564
*/
565565
@Input()
566-
get tasks(): { colorExpr?: Function | string, dataSource?: Array<any> | DataSource | DataSourceOptions | null | Store | string, endExpr?: Function | string, keyExpr?: Function | string, parentIdExpr?: Function | string, progressExpr?: Function | string, startExpr?: Function | string, titleExpr?: Function | string } {
566+
get tasks(): { colorExpr?: ((task: any, value: any) => any) | string, dataSource?: Array<any> | DataSource | DataSourceOptions | null | Store | string, endExpr?: ((task: any, value: any) => any) | string, keyExpr?: ((task: any) => any) | string, parentIdExpr?: ((task: any, value: any) => any) | string, progressExpr?: ((task: any, value: any) => any) | string, startExpr?: ((task: any, value: any) => any) | string, titleExpr?: ((task: any, value: any) => any) | string } {
567567
return this._getOption('tasks');
568568
}
569-
set tasks(value: { colorExpr?: Function | string, dataSource?: Array<any> | DataSource | DataSourceOptions | null | Store | string, endExpr?: Function | string, keyExpr?: Function | string, parentIdExpr?: Function | string, progressExpr?: Function | string, startExpr?: Function | string, titleExpr?: Function | string }) {
569+
set tasks(value: { colorExpr?: ((task: any, value: any) => any) | string, dataSource?: Array<any> | DataSource | DataSourceOptions | null | Store | string, endExpr?: ((task: any, value: any) => any) | string, keyExpr?: ((task: any) => any) | string, parentIdExpr?: ((task: any, value: any) => any) | string, progressExpr?: ((task: any, value: any) => any) | string, startExpr?: ((task: any, value: any) => any) | string, titleExpr?: ((task: any, value: any) => any) | string }) {
570570
this._setOption('tasks', value);
571571
}
572572

@@ -949,7 +949,7 @@ export class DxGanttComponent extends DxComponent implements OnDestroy, OnChange
949949
* This member supports the internal infrastructure and is not intended to be used directly from your code.
950950
951951
*/
952-
@Output() dependenciesChange: EventEmitter<{ dataSource?: Array<any> | DataSource | DataSourceOptions | null | Store | string, keyExpr?: Function | string, predecessorIdExpr?: Function | string, successorIdExpr?: Function | string, typeExpr?: Function | string }>;
952+
@Output() dependenciesChange: EventEmitter<{ dataSource?: Array<any> | DataSource | DataSourceOptions | null | Store | string, keyExpr?: ((dependency: any) => any) | string, predecessorIdExpr?: ((dependency: any, value: any) => any) | string, successorIdExpr?: ((dependency: any, value: any) => any) | string, typeExpr?: ((dependency: any, value: any) => any) | string }>;
953953

954954
/**
955955
@@ -1033,14 +1033,14 @@ export class DxGanttComponent extends DxComponent implements OnDestroy, OnChange
10331033
* This member supports the internal infrastructure and is not intended to be used directly from your code.
10341034
10351035
*/
1036-
@Output() resourceAssignmentsChange: EventEmitter<{ dataSource?: Array<any> | DataSource | DataSourceOptions | null | Store | string, keyExpr?: Function | string, resourceIdExpr?: Function | string, taskIdExpr?: Function | string }>;
1036+
@Output() resourceAssignmentsChange: EventEmitter<{ dataSource?: Array<any> | DataSource | DataSourceOptions | null | Store | string, keyExpr?: ((resourceAssignment: any) => any) | string, resourceIdExpr?: ((resourceAssignment: any, value: any) => any) | string, taskIdExpr?: ((resourceAssignment: any, value: any) => any) | string }>;
10371037

10381038
/**
10391039
10401040
* This member supports the internal infrastructure and is not intended to be used directly from your code.
10411041
10421042
*/
1043-
@Output() resourcesChange: EventEmitter<{ colorExpr?: Function | string, dataSource?: Array<any> | DataSource | DataSourceOptions | null | Store | string, keyExpr?: Function | string, textExpr?: Function | string }>;
1043+
@Output() resourcesChange: EventEmitter<{ colorExpr?: ((resource: any, value: any) => any) | string, dataSource?: Array<any> | DataSource | DataSourceOptions | null | Store | string, keyExpr?: ((resource: any) => any) | string, textExpr?: ((resource: any, value: any) => string) | string }>;
10441044

10451045
/**
10461046
@@ -1145,7 +1145,7 @@ export class DxGanttComponent extends DxComponent implements OnDestroy, OnChange
11451145
* This member supports the internal infrastructure and is not intended to be used directly from your code.
11461146
11471147
*/
1148-
@Output() tasksChange: EventEmitter<{ colorExpr?: Function | string, dataSource?: Array<any> | DataSource | DataSourceOptions | null | Store | string, endExpr?: Function | string, keyExpr?: Function | string, parentIdExpr?: Function | string, progressExpr?: Function | string, startExpr?: Function | string, titleExpr?: Function | string }>;
1148+
@Output() tasksChange: EventEmitter<{ colorExpr?: ((task: any, value: any) => any) | string, dataSource?: Array<any> | DataSource | DataSourceOptions | null | Store | string, endExpr?: ((task: any, value: any) => any) | string, keyExpr?: ((task: any) => any) | string, parentIdExpr?: ((task: any, value: any) => any) | string, progressExpr?: ((task: any, value: any) => any) | string, startExpr?: ((task: any, value: any) => any) | string, titleExpr?: ((task: any, value: any) => any) | string }>;
11491149

11501150
/**
11511151

packages/devextreme-angular/src/ui/gantt/nested/dependencies.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,34 +41,34 @@ export class DxoGanttDependenciesComponent extends NestedOption implements OnDes
4141
}
4242

4343
@Input()
44-
get keyExpr(): Function | string {
44+
get keyExpr(): ((dependency: any) => any) | string {
4545
return this._getOption('keyExpr');
4646
}
47-
set keyExpr(value: Function | string) {
47+
set keyExpr(value: ((dependency: any) => any) | string) {
4848
this._setOption('keyExpr', value);
4949
}
5050

5151
@Input()
52-
get predecessorIdExpr(): Function | string {
52+
get predecessorIdExpr(): ((dependency: any, value: any) => any) | string {
5353
return this._getOption('predecessorIdExpr');
5454
}
55-
set predecessorIdExpr(value: Function | string) {
55+
set predecessorIdExpr(value: ((dependency: any, value: any) => any) | string) {
5656
this._setOption('predecessorIdExpr', value);
5757
}
5858

5959
@Input()
60-
get successorIdExpr(): Function | string {
60+
get successorIdExpr(): ((dependency: any, value: any) => any) | string {
6161
return this._getOption('successorIdExpr');
6262
}
63-
set successorIdExpr(value: Function | string) {
63+
set successorIdExpr(value: ((dependency: any, value: any) => any) | string) {
6464
this._setOption('successorIdExpr', value);
6565
}
6666

6767
@Input()
68-
get typeExpr(): Function | string {
68+
get typeExpr(): ((dependency: any, value: any) => any) | string {
6969
return this._getOption('typeExpr');
7070
}
71-
set typeExpr(value: Function | string) {
71+
set typeExpr(value: ((dependency: any, value: any) => any) | string) {
7272
this._setOption('typeExpr', value);
7373
}
7474

packages/devextreme-angular/src/ui/gantt/nested/resource-assignments.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,26 @@ export class DxoGanttResourceAssignmentsComponent extends NestedOption implement
4141
}
4242

4343
@Input()
44-
get keyExpr(): Function | string {
44+
get keyExpr(): ((resourceAssignment: any) => any) | string {
4545
return this._getOption('keyExpr');
4646
}
47-
set keyExpr(value: Function | string) {
47+
set keyExpr(value: ((resourceAssignment: any) => any) | string) {
4848
this._setOption('keyExpr', value);
4949
}
5050

5151
@Input()
52-
get resourceIdExpr(): Function | string {
52+
get resourceIdExpr(): ((resourceAssignment: any, value: any) => any) | string {
5353
return this._getOption('resourceIdExpr');
5454
}
55-
set resourceIdExpr(value: Function | string) {
55+
set resourceIdExpr(value: ((resourceAssignment: any, value: any) => any) | string) {
5656
this._setOption('resourceIdExpr', value);
5757
}
5858

5959
@Input()
60-
get taskIdExpr(): Function | string {
60+
get taskIdExpr(): ((resourceAssignment: any, value: any) => any) | string {
6161
return this._getOption('taskIdExpr');
6262
}
63-
set taskIdExpr(value: Function | string) {
63+
set taskIdExpr(value: ((resourceAssignment: any, value: any) => any) | string) {
6464
this._setOption('taskIdExpr', value);
6565
}
6666

0 commit comments

Comments
 (0)