The output code is incorrect. The async pipe could return null. The input code expression will always return a boolean, while the output code expression can return null. That can result in a type error build.
Could be related to https://github.com/prettier/prettier/issues/187. Even though it seems like that issue does not talk about correctness, but about readability. According to the docs - incorrect code output is always a bug.
Prettier 2.8.8 Playground link
Input:
Output:
Expected behavior:
The output code is incorrect. The
async
pipe could return null. The input code expression will always return a boolean, while the output code expression can return null. That can result in a type error build.Could be related to https://github.com/prettier/prettier/issues/187. Even though it seems like that issue does not talk about correctness, but about readability. According to the docs - incorrect code output is always a bug.