Skip to content

Conversation

@dmlvr
Copy link
Contributor

@dmlvr dmlvr commented Jan 9, 2026

No description provided.

@dmlvr dmlvr self-assigned this Jan 9, 2026
@dmlvr dmlvr added the 26_1 label Jan 9, 2026
@dmlvr dmlvr marked this pull request as ready for review January 12, 2026 10:08
@dmlvr dmlvr requested a review from a team as a code owner January 12, 2026 10:08
Copilot AI review requested due to automatic review settings January 12, 2026 10:08
Copy link
Contributor

Copilot AI left a 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 pull request fixes TypeScript problems in React demos for VectorMap, FloatingActionButton, and Localization components, enabling the removal of exclusions from tsconfig.react-check.json.

Changes:

  • Added TypeScript type definitions for VectorMap data modules and improved type safety across VectorMap demos
  • Enhanced TypeScript types in FloatingActionButton demo with proper ref typing and data structure definitions
  • Added global TypeScript declarations for Globalize and JSON imports in Localization demo
  • Changed tooltip functions to return empty objects instead of null for consistency
  • Added proper ref types and optional chaining for component instance access

Reviewed changes

Copilot reviewed 36 out of 48 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
apps/demos/tsconfig.react-check.json Removed exclusions for FloatingActionButton, VectorMap, and Localization demos now that TS issues are fixed
apps/demos/Demos/VectorMap/**/React/devextreme-vectormap-data.d.ts Added type definitions for GeoJSON world map data (multiple files)
apps/demos/Demos/VectorMap/**/React/data.ts Added type definitions for GDP and population data structures
apps/demos/Demos/VectorMap/**/React/App.tsx Improved types with proper casting and optional chaining
apps/demos/Demos/VectorMap/**/React/TooltipTemplate.tsx Added types for tooltip template components (with issues)
apps/demos/Demos/VectorMap/**/React/PieChartComponent.tsx Added proper prop interfaces for PieChart components
apps/demos/Demos/VectorMap/**/ReactJs/*.js Applied consistent changes to JavaScript versions (return {}, optional chaining)
apps/demos/Demos/FloatingActionButton/Overview/React/data.ts Added comprehensive type definitions for direction configuration
apps/demos/Demos/FloatingActionButton/Overview/React/App.tsx Added proper ref typing and improved type safety
apps/demos/Demos/Localization/UsingGlobalize/React/global.d.ts Added global type declarations for third-party modules


const selectedChanged = useCallback((e: DataGridTypes.SelectionChangedEvent) => {
setSelectedRowIndex(e.component.getRowIndexByKey(e.selectedRowKeys[0]));
}, [setSelectedRowIndex]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an excessive dependancy, there's no need to add setters of useState hook as deps, please check other places as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed dependancy

Comment on lines +1 to +9
declare module '*.json' {
const value: any;
export default value;
}

declare module 'globalize' {
const Globalize: any;
export default Globalize;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose of these d.ts files?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello!

Without a d.ts file, I encountered two types of errors:

  1. Cannot find module 'devextreme/localization/messages/{some name}.json'. Consider using '--resolveJsonModule' to import module with '.json' extension. I can't fix tsconfig for demos and I resolved this in the d.ts level

  2. declare module 'globalize' We don't have types for globalize. But there is this package on npm https://www.npmjs.com/package/@types/globalize. I decided to add declare for it, just because I've created file d.ts on the previous step


const clickHandler = ({ target }) => {
if (target && countries[target.attribute('name')]) {
const clickHandler = ({ target }: { target: MapLayerElement }) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there should be an appropriate type for this handles like MapClickEvent or smth like that


const customizeTooltip: ITooltipProps['customizeTooltip'] = ({ attribute }) => {
const name = attribute('name');
const name = attribute('name') as keyof typeof countries;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps it's better to separate this type

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants