-
Notifications
You must be signed in to change notification settings - Fork 666
d.ts: Function -> (() => void | string | any, etc) #33163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 26_1
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -288,10 +288,10 @@ export class DxAccordionComponent<TItem = any, TKey = any> extends DxComponent i | |||||
|
|
||||||
| */ | ||||||
| @Input() | ||||||
| get keyExpr(): Function | string { | ||||||
| get keyExpr(): (() => string) | string { | ||||||
| return this._getOption('keyExpr'); | ||||||
| } | ||||||
| set keyExpr(value: Function | string) { | ||||||
| set keyExpr(value: (() => string) | string) { | ||||||
| this._setOption('keyExpr', value); | ||||||
| } | ||||||
|
|
||||||
|
|
@@ -635,7 +635,7 @@ export class DxAccordionComponent<TItem = any, TKey = any> extends DxComponent i | |||||
| * This member supports the internal infrastructure and is not intended to be used directly from your code. | ||||||
|
|
||||||
| */ | ||||||
| @Output() keyExprChange: EventEmitter<Function | string>; | ||||||
| @Output() keyExprChange: EventEmitter<(() => string) | string>; | ||||||
|
||||||
| @Output() keyExprChange: EventEmitter<(() => string) | string>; | |
| @Output() keyExprChange: EventEmitter<((item: any) => string) | string>; |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -380,10 +380,10 @@ export class DxListComponent<TItem = any, TKey = any> extends DxComponent implem | |||||
|
|
||||||
| */ | ||||||
| @Input() | ||||||
| get keyExpr(): Function | string { | ||||||
| get keyExpr(): (() => string) | string { | ||||||
| return this._getOption('keyExpr'); | ||||||
| } | ||||||
| set keyExpr(value: Function | string) { | ||||||
| set keyExpr(value: (() => string) | string) { | ||||||
| this._setOption('keyExpr', value); | ||||||
|
Comment on lines
382
to
387
|
||||||
| } | ||||||
|
|
||||||
|
|
@@ -1120,7 +1120,7 @@ export class DxListComponent<TItem = any, TKey = any> extends DxComponent implem | |||||
| * This member supports the internal infrastructure and is not intended to be used directly from your code. | ||||||
|
|
||||||
| */ | ||||||
| @Output() keyExprChange: EventEmitter<Function | string>; | ||||||
| @Output() keyExprChange: EventEmitter<(() => string) | string>; | ||||||
|
||||||
| @Output() keyExprChange: EventEmitter<(() => string) | string>; | |
| @Output() keyExprChange: EventEmitter<((item: any) => any) | string>; |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -237,10 +237,10 @@ export class DxTabsComponent<TItem = any, TKey = any> extends DxComponent implem | |||||
|
|
||||||
| */ | ||||||
| @Input() | ||||||
| get keyExpr(): Function | string { | ||||||
| get keyExpr(): (() => string) | string { | ||||||
| return this._getOption('keyExpr'); | ||||||
| } | ||||||
| set keyExpr(value: Function | string) { | ||||||
| set keyExpr(value: (() => string) | string) { | ||||||
| this._setOption('keyExpr', value); | ||||||
|
Comment on lines
239
to
244
|
||||||
| } | ||||||
|
|
||||||
|
|
@@ -621,7 +621,7 @@ export class DxTabsComponent<TItem = any, TKey = any> extends DxComponent implem | |||||
| * This member supports the internal infrastructure and is not intended to be used directly from your code. | ||||||
|
|
||||||
| */ | ||||||
| @Output() keyExprChange: EventEmitter<Function | string>; | ||||||
| @Output() keyExprChange: EventEmitter<(() => string) | string>; | ||||||
|
||||||
| @Output() keyExprChange: EventEmitter<(() => string) | string>; | |
| @Output() keyExprChange: EventEmitter<((item: any) => any) | string>; |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -88,7 +88,7 @@ const componentConfig = { | |||||
| items: Array as PropType<Array<any | dxAccordionItem | string>>, | ||||||
| itemTemplate: {}, | ||||||
| itemTitleTemplate: {}, | ||||||
| keyExpr: [Function, String] as PropType<((() => void)) | string>, | ||||||
| keyExpr: [Function, String] as PropType<((() => string)) | string>, | ||||||
|
||||||
| keyExpr: [Function, String] as PropType<((() => string)) | string>, | |
| keyExpr: [Function, String] as PropType<Properties["keyExpr"]>, |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -201,7 +201,7 @@ const componentConfig = { | |||||
| itemHoldTimeout: Number, | ||||||
| items: Array as PropType<Array<any | dxListItem | string>>, | ||||||
| itemTemplate: {}, | ||||||
| keyExpr: [Function, String] as PropType<((() => void)) | string>, | ||||||
| keyExpr: [Function, String] as PropType<((() => string)) | string>, | ||||||
|
||||||
| keyExpr: [Function, String] as PropType<((() => string)) | string>, | |
| keyExpr: [Function, String] as PropType<Properties["keyExpr"]>, |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -91,7 +91,7 @@ const componentConfig = { | |||||
| itemHoldTimeout: Number, | ||||||
| items: Array as PropType<Array<any | dxTabsItem | string>>, | ||||||
| itemTemplate: {}, | ||||||
| keyExpr: [Function, String] as PropType<((() => void)) | string>, | ||||||
| keyExpr: [Function, String] as PropType<((() => string)) | string>, | ||||||
|
||||||
| keyExpr: [Function, String] as PropType<((() => string)) | string>, | |
| keyExpr: [Function, String] as PropType<Properties["keyExpr"]>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keyExpris typed as(() => string) | string, but in collection widgets this callback is treated as a key getter and invoked with item data. The zero-arg signature and forcedstringreturn type are both incompatible with common usage.Suggested fix: type it as
((item: TItem) => TKey) | stringfor both getter and setter.