-
Notifications
You must be signed in to change notification settings - Fork 666
Diagram: Extend Shapes Types #32365
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?
Diagram: Extend Shapes Types #32365
Conversation
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.
Pull request overview
This PR updates the TypeScript type definition for the shapes property in the Diagram component from Array<ShapeType> | Array<string> to Array<ShapeType | string>. This change makes the type more accurate and flexible by allowing arrays that can contain both built-in ShapeType values and custom shape type strings, rather than requiring the array to contain only one type or the other.
Changes:
- Updated core TypeScript type definitions to use
Array<ShapeType | string>instead ofArray<ShapeType> | Array<string> - Regenerated framework wrappers (Angular, React, Vue) to reflect the updated type definitions
- Removed unnecessary type casts (
as anyandas unknown as DxDiagramTypes.ShapeType[]) from demo applications
Reviewed changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/devextreme/js/ui/diagram.d.ts | Updated core type definition for shapes property in contextToolbox and toolbox.groups |
| packages/devextreme/ts/dx.all.d.ts | Updated type definition in dx.all bundle |
| packages/devextreme-react/src/diagram.ts | Regenerated React wrapper with updated type definitions |
| packages/devextreme-vue/src/diagram.ts | Regenerated Vue wrapper with updated type definitions |
| packages/devextreme-angular/src/ui/diagram/index.ts | Regenerated Angular main component with updated type definitions |
| packages/devextreme-angular/src/ui/diagram/nested/context-toolbox.ts | Regenerated Angular nested component for contextToolbox |
| packages/devextreme-angular/src/ui/diagram/nested/toolbox.ts | Regenerated Angular nested component for toolbox |
| packages/devextreme-angular/src/ui/diagram/nested/toolbox-group-dxi.ts | Regenerated Angular nested component for toolbox group |
| packages/devextreme-angular/src/ui/diagram/nested/group-dxi.ts | Regenerated Angular nested component for group |
| apps/demos/Demos/Diagram/OperationRestrictions/Vue/App.vue | Removed unnecessary type cast for shapes array |
| apps/demos/Demos/Diagram/OperationRestrictions/React/App.tsx | Removed unnecessary type casts for shapes array |
No description provided.