alfresco-js-api icon indicating copy to clipboard operation
alfresco-js-api copied to clipboard

TypeScript strict compiler option throws errors in client project

Open nbarithel opened this issue 6 years ago • 2 comments

Type of issue:

- [ ] New feature request
- [x] Bug  
- [ ] Support request

Current behavior: When setting TypeScript compiler options to strict in an Angular project that depends on @alfresco/js-api (v3.4.0 at the time), errors are reported against node_modules/@alfresco/js-api/src/**/*.ts This is not the case with @alfresco/adf-core.

Expected behavior: Errors should only be reported for the project's own *.ts files

Steps to reproduce the issue:

  • sudo npm install -g yo
  • npm install -g generator-alfresco-adf-app
  • yo alfresco-adf-app
  • vim tsconfig.json and add "strict": true to "compilerOptions"
  • npm install
  • npm run build

Node version (for build issues):
8.16.1

Thanks for your help

nbarithel avatar Sep 16 '19 13:09 nbarithel

Thanks for raising an issue, we are working on that in this PR: #416

DenysVuika avatar Oct 10 '19 12:10 DenysVuika

Just to keep you updated, the path to "strict" mode is very hard, so we are trying to make smaller changes that will eventually allow us upgrade the code.

The biggest obstacle right now is that major part is generated from the Swagger/OpenAPI definitions using Java tools, and we may need to rewrite the generators to provide a compliant output.

DenysVuika avatar Oct 23 '19 06:10 DenysVuika