I have the following ES6 class.
class Http {
isFormData;
url;
token;
data;
constructor() {
this.isFormData = false;
this.url = '';
this.token = '';
this.data = {};
}
/** Set url */
setUrl(url: string) {
this.url = url;
return this;
}
/** Set data */
setData(data: Object) {
this.data = data;
return this;
}
}
export default new Http();
I want to make it a typescript class. I tried but some properties are not identified properly. How can I make it a typescript class?