Private identifiers are only available when targeting ECMAScript 2015 and higher (Angular 9)

Discussão em 'Angular' iniciado por matchifang, Maio 20, 2025.

  1. matchifang

    matchifang Guest

    I'm upgrading from Angular 8.2 to 9.1 and I'm trying to change private fields to be #fieldName: any as allowed by TS 3.8 instead of private fieldName: any. And I get the compiler error saying


    Private identifiers are only available when targeting ECMAScript 2015 and higher.
    ​

    tsconfig.json:

    {
    "compilerOptions": {
    "module": "esnext"
    "target": "es2015",
    }
    }


    package.json:

    "devDependencies": {
    "typescript": "3.8.3"
    }

    Continue reading...

Compartilhe esta Página