While using Angular, I encountered the error
TS1086: An accessor cannot be declared in an ambient context.
when using Javascript getters and setters in this Abstract Typescript class.
Here is the code snippet causing the issue:
/**
* The current id key for the EStore instance.
* @return this.config.idKey;
*/
get ID_KEY(): string {
return this.config.idKey
}
/**
* The current guid key for the EStore instance.
* @return this.config.guidKey;
*/
get GUID_KEY(): string {
return this.config.guidKey
}
This functionality was working perfectly until the recent update of Angular. Could it be that getters and setters are no longer allowed in Abstract classes?