Home > Back-end >  Angular. TS2339: Property 'subscribe' does not exist on type 'void'
Angular. TS2339: Property 'subscribe' does not exist on type 'void'

Time:02-07

enter image description here

I am getting this error: TS2339: Property 'subscribe' does not exist on type 'void'.

CodePudding user response:

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.

  •  Tags:  
  • Related