Skip to content

Commit 37a1338

Browse files
Merge pull request #1626 from WonderPanda/fix/microservices-custom-transport-types
docs(microservices): custom transport typings
2 parents ed5bc7c + 133c7e9 commit 37a1338

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/app/homepage/pages/microservices/custom-transport/custom-transport.component.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ export class RabbitMQServer extends Server implements CustomTransportStrategy {
6767
get rabbitMqServerJs() {
6868
return `
6969
import * as amqp from 'amqplib';
70-
import { Server } from '@nestjs/microservices';
70+
import { Server, CustomStrategy } from '@nestjs/microservices';
7171
import { Observable } from 'rxjs';
7272
7373
export class RabbitMQServer extends Server {
@@ -123,7 +123,7 @@ export class RabbitMQServer extends Server {
123123

124124
get setupServer() {
125125
return `
126-
const app = await NestFactory.createMicroservice(ApplicationModule, {
126+
const app = await NestFactory.createMicroservice<CustomStrategy>(ApplicationModule, {
127127
strategy: new RabbitMQServer('amqp://localhost', 'channel'),
128128
});`;
129129
}

0 commit comments

Comments
 (0)