Guid, Dependency_injector: improve typing - #34807
Open
EugeniyKiyashko wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates two legacy core utilities (Guid and dependency injector) away from the older m_* implementations to new TypeScript modules, and updates internal imports/usages accordingly to improve typing and consistency across the codebase.
Changes:
- Replaced
m_guidwith a newGuidTypeScript class implementation and updated all related imports. - Replaced
m_dependency_injectorwith a new TypeScript implementation and updated localization/core helpers to use it. - Adjusted CardView card DOM id generation to use
Guid().toString()explicitly and updated related tests/imports.
Reviewed changes
Copilot reviewed 17 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| packages/devextreme/js/core/utils/dependency_injector.js | Updates deprecated facade to re-export injector from the new internal module. |
| packages/devextreme/js/common/guid.js | Updates public facade to re-export Guid from the new internal module. |
| packages/devextreme/js/__internal/ui/drop_down_button.ts | Switches Guid import to the new module path. |
| packages/devextreme/js/__internal/ui/color_box/color_view.ts | Switches Guid import to the new module path. |
| packages/devextreme/js/__internal/integration/knockout/validation.ts | Switches Guid import to the new module path. |
| packages/devextreme/js/__internal/grids/new/grid_core/search/options.integration.test.ts | Switches Guid import to the new module path in Jest test. |
| packages/devextreme/js/__internal/grids/new/card_view/content_view/content/card/card.tsx | Switches Guid import and explicitly converts generated ids to strings. |
| packages/devextreme/js/__internal/grids/new/card_view/content_view/content/card/card.test.tsx | Switches Guid import to the new module path in Jest test. |
| packages/devextreme/js/__internal/core/utils/m_dependency_injector.ts | Removes legacy injector implementation. |
| packages/devextreme/js/__internal/core/utils/dependency_injector.ts | Adds new TypeScript injector implementation (with override wrapping). |
| packages/devextreme/js/__internal/core/m_guid.ts | Removes legacy Guid implementation. |
| packages/devextreme/js/__internal/core/localization/number.ts | Updates dependency injector import to new module path. |
| packages/devextreme/js/__internal/core/localization/message.ts | Updates dependency injector import to new module path. |
| packages/devextreme/js/__internal/core/localization/date.ts | Updates dependency injector import to new module path. |
| packages/devextreme/js/__internal/core/localization/core.ts | Updates dependency injector import to new module path. |
| packages/devextreme/js/__internal/core/guid.ts | Adds new TypeScript Guid class implementation. |
| packages/devextreme/js/__internal/core/format_helper.ts | Updates dependency injector import to new module path. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+31
to
+33
| // eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
| function injector(object: object): any { | ||
| const facade = object as InjectionObject; |
EugeniyKiyashko
force-pushed
the
typescript/core/26_2_quid
branch
from
August 19, 2026 07:15
eaf46c7 to
8ae28d2
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 32 out of 32 changed files in this pull request and generated 1 comment.
Suppressed comments (1)
packages/devextreme/js/__internal/core/guid.ts:2
Guid._valueis markedprivate, but there is existing code that reads it directly (e.g. for building IDs), which forces@ts-expect-errorat call sites. If_valueis part of the effective contract, it should bepublic readonly(or expose a public accessor and update call sites).
private readonly _value: string;
Comment on lines
1
to
2
| import { logger } from '@js/core/utils/console'; | ||
| import dependencyInjector from '@js/core/utils/dependency_injector'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.