Typescript 4.9 introduced a new keyword accessor
to automatically make a property private and generate its accessors.
If I try to compile code that uses this keyword, I get the following error:
$ tsup src/index.ts --format esm --dts --clean
CLI Building entry: src/index.ts
CLI Using tsconfig: tsconfig.json
CLI tsup v6.6.3
CLI Target: es2022
CLI Cleaning output folder
ESM Build start
✘ [ERROR] Expected ";" but found "fieldName"
I rewrote my code to not use the keyword and it compiles perfectly.
Also, I compiled the code containing the keyword accessor
using tsc
and it is compiled properly.
So I suppose it's a compatibility issue with the last version of Typescript?
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too