TS1056

Accessors are only available when targeting ECMAScript 5 and higher.

Broken Code ❌

User.ts
class User {
  constructor(
    private firstName: string,
    private lastName: string
  ) {}
 
  get fullName() {
    return `${this.firstName} ${this.lastName}`;
  }
}
tsconfig.json
{
  "compilerOptions": {
    "target": "es3"
  }
}

Fixed Code ✔️

Set the "target" property in your "tsconfig.json" file to "es5" or higher:

tsconfig.json
{
  "compilerOptions": {
    "target": "es5"
  }
}