Skip to content
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

fix(microservices): Fixed typings for MessageHandler #9674

Merged
merged 1 commit into from Jun 15, 2022

Conversation

dkonasov
Copy link
Contributor

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: #9668

What is the new behavior?

MessageHandler return type was changed to Promise<Observable<TResult>> | Promise<TResult>

Does this PR introduce a breaking change?

  • Yes
  • No

Since the return type had changed, users may be required to cast type explicitly in the old code.

let handler: MessageHandler;
...
let result = await messageHandler(data);
// Here we need type casting
(result as Observable<...>).pipe(...);
// Same for next method
result = await messageHandler.next(data);
(result as Observable<...>).pipe(...);

Other information

fixes #9668

@coveralls
Copy link

Pull Request Test Coverage Report for Build b3c7a6d9-e836-4faf-88c7-911067867cbc

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 94.107%

Totals Coverage Status
Change from base Build 0b0f62d7-5768-434b-b26f-340c513ce1c1: 0.0%
Covered Lines: 5781
Relevant Lines: 6143

💛 - Coveralls

@kamilmysliwiec kamilmysliwiec added this to the 9.0.0 milestone May 27, 2022
@kamilmysliwiec kamilmysliwiec changed the base branch from master to 9.0.0 June 15, 2022 09:42
@kamilmysliwiec kamilmysliwiec merged commit 42a538e into nestjs:9.0.0 Jun 15, 2022
@kamilmysliwiec kamilmysliwiec mentioned this pull request Jun 15, 2022
12 tasks
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.

Wrong typings for MessageHandler
4 participants