alfresco-js-api
alfresco-js-api copied to clipboard
TypeScript strict compiler option throws errors in client project
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
Thanks for raising an issue, we are working on that in this PR: #416
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.