0๐
โ
You basically never instantiate leadService field of GpbApi if I am see it correctly.
So, you should instantiate loadService
field in gpbApi
class GpbApi {
leadService = leadService;
}
0๐
I would suggest removing typeof word from interface properties declaration like:
interface Vue {
$gpbApi: gpbApi;
}
and the same with class definition:
class GpbApi {
leadService!: leadService;
}
Source:stackexchange.com