Skip to content

Conversation

@PongDev
Copy link

@PongDev PongDev commented Jun 3, 2025

When a ConfigService type is provided, the return type should match the given type; otherwise, a compile error should occur.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

When the type of receiver variable and the type provided by ConfigService don't match, no error occurs.

What is the new behavior?

When a ConfigService type is provided, a typescript compile error will occur if return type and given type doesn't match.

Does this PR introduce a breaking change?

  • Yes
  • No

If a variable type has previously provided but doesn't match the return type provided in ConfigService, typescript will produce a compile error and // @ts-ignore is required to ignore error.

Other information

When a ConfigService type is provided, the return type should match the given type; otherwise, a compile error should occur.
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.

1 participant