I am getting this error: TS2339: Property 'subscribe' does not exist on type 'void'.
Asked
Active
Viewed 1,476 times
-3

Tomislav Stankovic
- 3,080
- 17
- 35
- 42

mchedlo
- 29
- 2
-
The return type of `httpService.getGameDetails` is `void`. – jabaa Feb 06 '22 at 21:16
-
@mchedlo - you should add here the getGameDetails function in your httpService. Ideally as a code snippet, not as a screenshot. – dopoto Feb 07 '22 at 09:02
2 Answers
1
Change the return type of httpService.gameDetails
to the object that you created called Game
instead of void
, also return the response. I think it's implicitly marking as void becase you won't be returning anything in your gameDetails method.

HassanMoin
- 2,024
- 1
- 6
- 16
0
You forgot to add 'return' somewhere here, probably in front of 'this.gameSub'

Agung Sudrajat
- 120
- 9