I'm currently encountering an issue with creating a getter and setter for a field in TypeScript.
searchFilter: string;
get searchFilter(): string {
return this.searchFilter;
}
set searchFilter(value: string) {
this.searchFilter = value;
}
Unfortunately, I receive the following error message:
Duplicate identifier 'searchFilter'.
My TypeScript implementation is in an Angular project utilizing the following versions:
@angular/cdk: 6.0.1
@angular/cli: 1.7.4
typescript: 2.5.3