Skip to content

refactor: typing for inject decorator #94

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

Merged
merged 2 commits into from
Apr 19, 2025
Merged

Conversation

Groupguanfang
Copy link
Owner

No description provided.

@Copilot Copilot AI review requested due to automatic review settings April 19, 2025 04:53
@Groupguanfang Groupguanfang merged commit 265f301 into v1 Apr 19, 2025
3 checks passed
Copy link
Contributor

@Copilot 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 PR refactors the typing for the Inject decorator to improve type safety and clarity. Key changes include:

  • Adding a TValue generic parameter to the Inject overload that accepts a ClassFieldDecoratorContext.
  • Replacing the propertyKey type from string | symbol to a generic TPropertyKey in the second overload.
  • Including a changeset file to document the version update for this refactor.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
packages/core/core/src/decorators/inject.ts Updated function overloads for the Inject decorator with enhanced generics.
.changeset/fifty-falcons-lick.md Added a changeset file to document the patch for the inject decorator refactor.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants