Skip to content

Commit 65f8034

Browse files
authored
Fallback from Record<string, any> to 'any' for function parameters (#839)
1 parent 66f9afc commit 65f8034

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

packages/devextreme-react-generator/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"author": "Developer Express Inc.",
33
"name": "devextreme-react-generator",
4-
"version": "4.1.1",
4+
"version": "4.1.2",
55
"description": "DevExtreme React UI and Visualization Components",
66
"repository": {
77
"type": "git",

packages/devextreme-react-generator/src/generator.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,10 @@ export function getComplexOptionType(
134134
}
135135

136136
function formatFunctionDescriptor(functionDescriptor: IFunctionDescr): string {
137-
const parameters = functionDescriptor.params?.map((p) => `${p.name}: ${getComplexOptionType(p.types, resolveCustomType) || BaseTypes.Any}`)
137+
const parameters = functionDescriptor.params?.map((p) => {
138+
const parameterType = getComplexOptionType(p.types, resolveCustomType) || BaseTypes.Any;
139+
return `${p.name}: ${parameterType === BaseTypes.Object ? BaseTypes.Any : parameterType}`;
140+
})
138141
.join(', ') || '';
139142
const returnType = (
140143
functionDescriptor.returnValueType && (formatTypeDescriptor(functionDescriptor.returnValueType) || (functionDescriptor.returnValueType.type === 'void' && 'void'))

packages/devextreme-react/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"@types/react-dom": "^16.9.16",
3636
"del": "^3.0.0",
3737
"devextreme": "23.1-next",
38-
"devextreme-react-generator": "^4.1.1",
38+
"devextreme-react-generator": "^4.1.2",
3939
"gulp": "^4.0.2",
4040
"jest": "^25.0.0",
4141
"react": "~18.0.0",

0 commit comments

Comments
 (0)