@Types/Sequelize Error TS1086: An accessor cannot be declared in ambient context

you need to use typescript 3.7.

from typescript 3.7 release notes:

To detect the issue around accessors, TypeScript 3.7 will now emit get/set accessors in .d.ts files so that in TypeScript can check for overridden accessors.

so presumably sequelize was compiled with typescript 3.7 and emits definition files that previous versions don't understand. So you'll need to upgrade to typescript 3.7 or use an earlier version of sequelize.


I have Angular 8. it is working with typescript version of 3.4.5. so solve this issue do below steps.

step 1) go to the tsconfig.json file

step 2) add skipLibCheck: true in "compilerOptions" object. It works for me.

"compilerOptions": {
    "module": "commonjs",
    "moduleResolution": "node",
    "strict": true,
    "target": "es5",
    "declaration": true,
    "declarationDir": "dist-debug/",
    "skipLibCheck": true, /// Needs to be true to fix wrong alias types being used

  },

Setting "skipLibCheck": true worked for me.