Skip to content

Commit

Permalink
docs: Fix NestJS example.
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenh committed Dec 21, 2023
1 parent eca446c commit 4c94318
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions NESTJS.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -84,16 +84,16 @@ export class HeroController implements HeroServiceController {

```typescript
// ...
import { HeroById, Hero, HeroServiceController, HeroesService, HERO_SERVICE_NAME, HERO_PACKAGE_NAME } from '../hero';
import { HeroById, Hero, HeroServiceController, HeroesServiceClient, HERO_SERVICE_NAME, HERO_PACKAGE_NAME } from '../hero';

@Injectable()
export class AppService implements OnModuleInit {
private heroesService: HeroesService;
private heroesService: HeroesServiceClient;

constructor(@Inject(HERO_PACKAGE_NAME) private client: ClientGrpc) {}

onModuleInit(): void {
this.heroesService = this.client.getService<HeroesService>(HERO_SERVICE_NAME);
this.heroesService = this.client.getService<HeroesServiceClient>(HERO_SERVICE_NAME);
}

getHero(): Observable<Hero> {
Expand Down

0 comments on commit 4c94318

Please sign in to comment.