Typescript "super calls are not permitted outside constructors or in nested functions inside constructors"

1ogrenci (11) 3 ay önce sordu

Angular service class'ım içinde şöyle bir kodum var: 

 contructor(http: HttpClient) {
   super(http);
 }

bu satırda TS: Super calls are not permitted outside constructors or in nested functions inside constructors. hatası alıyorum. Sebebi ne olabilir?

Toplam 1 cevap


alattin (17014) 3 ay önce cevapladı
contructor

değil. Yazım hatası olmuş, doğrusu:

constructor

Bu sebepten hata alıyorsun.