Skip to content

Guid, Dependency_injector: improve typing - #34807

Open
EugeniyKiyashko wants to merge 2 commits into
DevExpress:mainfrom
EugeniyKiyashko:typescript/core/26_2_quid
Open

Guid, Dependency_injector: improve typing#34807
EugeniyKiyashko wants to merge 2 commits into
DevExpress:mainfrom
EugeniyKiyashko:typescript/core/26_2_quid

Conversation

@EugeniyKiyashko

Copy link
Copy Markdown
Contributor

No description provided.

@EugeniyKiyashko EugeniyKiyashko self-assigned this Aug 18, 2026
Copilot AI lite review requested due to automatic review settings August 18, 2026 09:51
@EugeniyKiyashko
EugeniyKiyashko requested review from a team as code owners August 18, 2026 09:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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_guid with a new Guid TypeScript class implementation and updated all related imports.
  • Replaced m_dependency_injector with 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
EugeniyKiyashko force-pushed the typescript/core/26_2_quid branch from eaf46c7 to 8ae28d2 Compare August 19, 2026 07:15
Copilot AI review requested due to automatic review settings August 19, 2026 07:15

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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._value is marked private, but there is existing code that reads it directly (e.g. for building IDs), which forces @ts-expect-error at call sites. If _value is part of the effective contract, it should be public 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';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants