-
Notifications
You must be signed in to change notification settings - Fork 14
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
Support strictTemplates
/ All pipes should accept null and undefined
#347
Labels
Comments
Hi @MickL , |
MickL
changed the title
Alle pipes should accept undefined
Alle pipes should accept null and undefined
Feb 10, 2021
I added "null" to the example because when using the async pipe its return type is |
MickL
changed the title
Alle pipes should accept null and undefined
Support Feb 15, 2021
strictTemplates
/ All pipes should accept null and undefined
joanllenas
added a commit
that referenced
this issue
Feb 21, 2021
The format* pipes family (the ones that return string) now accept null and undefined so they can be piped with the async pipe on strict mode #347
Awesome :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
With Angular strict mode all inputs need to be optional:
Or using the async pipe returns
null
:But then the compiler is throwing an error with ngx-date-fns pipes, e.g.:
I would suggest to add strict typechecking to tsconfig:
and add a questionmark to all pipe inputs to support
undefined
and also acceptnull
, e.g. the format pipe:The text was updated successfully, but these errors were encountered: