Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core,platform,docs): enable strictTemplates #7563

Closed
platon-rov opened this issue Jan 17, 2022 · 1 comment · Fixed by #7998
Closed

feat(core,platform,docs): enable strictTemplates #7563

platon-rov opened this issue Jan 17, 2022 · 1 comment · Fixed by #7998
Labels
core Core library specific issues documentation There is an issue with documentation enhancement New feature or request platform platform
Projects

Comments

@platon-rov
Copy link
Contributor

platon-rov commented Jan 17, 2022

Is this a bug, enhancement, or feature request?

Feature.

Briefly describe your proposal.

Enable strictTemplates & fullTemplateTypeCheck in base tsconfig for better type checking in html templates, fix stackBlitz examples, to enable "go to definition" in vscode.

Which versions of Angular and Fundamental Library for Angular are affected? (If this is a feature request, use current version.)

0.33.0-rc.275

Is there anything else we should know?

Because we don't have listed above flags enabled when compiling a docs app, libs are not being checked, thus we may have a various kinds of bugs and typos.

Also, stackblitz seems doesn't react to disabling such flags, that's why we have some of the examples broken while they're working in our docs app. Enabling flags & fixing all the errors will automatically fix all the stackblitz issues.

Can be enabled after solving errors listed in #7564 & #7565

@platon-rov
Copy link
Contributor Author

Got the feedback from stackblitz about ability to disable strictTemplates \ fullTemplateTypeCheck.

stackblitz/core#1710

Stackblitz V1 does not support too much customisation of the Typescript Compiler because much of what is does is with its own custom pipeline. It uses reasonable defaults, which strictTemplates is definitely a part of.
So unfortunately, I don't think we will support turning this option off.

But, maybe more to the crux of your issue, strictTemplates is actually pointing out a valid issue in your Angular code.
Your code:
Should rather be: <comp-b [prop]="false">
In this way you will be binding the value of the property to the false boolean value.

PS. If you would really like to be able to have full control of this type of thing, then I would suggest using StackBlitz v2, that is, WebContainers ;-)

As WebContainers still not supported in Safari i don't think we should go this way, so the only one way left to fix all the stackblitz examples - enable strictTemplates \ fullTemplateTypeCheck flags & fix all the errors.

@droshev droshev added this to Backlog in Development via automation Apr 7, 2022
@droshev droshev moved this from Backlog to PO Backlog in Development Apr 7, 2022
@droshev droshev moved this from PO Backlog to Sprint Goal in Development Apr 13, 2022
Development automation moved this from Sprint Goal to Done Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core library specific issues documentation There is an issue with documentation enhancement New feature or request platform platform
Projects
No open projects
Development
  
Done
Development

Successfully merging a pull request may close this issue.

1 participant