nestjs / docs.nestjs.com

The official documentation https://docs.nestjs.com 📕
MIT License
1.18k stars 1.69k forks source link

Typo In gateways doc examples #95

Closed bradtaniguchi closed 6 years ago

bradtaniguchi commented 6 years ago

I found a small typo in the gateways doc examples in the Asynchronous responses section.

The code in the example is as followed:

@SubscribeMessage('events')
onEvent(client, data: any: Observable<WsResponse<number>> {
  const event = 'events';
  const response = [1, 2, 3];

  return from(response).pipe(
    map(data => ({ event, data })),
  );
}

The onEvent function seems like its missing its closing ) character after data: any.

Issue within the code is found at this line

thanks for all the work done on NestJs, so far loving the framework 👍 😄

kamilmysliwiec commented 6 years ago

Thanks @bradtaniguchi! Fixed, will push soon