mirror of
https://github.com/nestjs/nest.git
synced 2026-02-21 23:11:44 +00:00
refactor(microservices): drop useless type assertion on server
on every type assertion for `Observable<any>` that is not needed anymore.
This commit is contained in:
@@ -123,7 +123,7 @@ export class ServerMqtt extends Server implements CustomTransportStrategy {
|
||||
}
|
||||
const response$ = this.transformToObservable(
|
||||
await handler(packet.data, mqttContext),
|
||||
) as Observable<any>;
|
||||
);
|
||||
response$ && this.send(response$, publish);
|
||||
}
|
||||
|
||||
@@ -191,7 +191,8 @@ export class ServerMqtt extends Server implements CustomTransportStrategy {
|
||||
|
||||
for (const [key, value] of this.messageHandlers) {
|
||||
if (
|
||||
!key.includes(MQTT_WILDCARD_SINGLE) && !key.includes(MQTT_WILDCARD_ALL)
|
||||
!key.includes(MQTT_WILDCARD_SINGLE) &&
|
||||
!key.includes(MQTT_WILDCARD_ALL)
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user