TS2367: This condition will always return ‘false’ since the types ‘string’ and ‘number’ have no overlap. even with ‘==’

  angular, angular10, equality, migration

i am migrating my app from Angular 5 tp 10, post migration i am getting error This condition will always return ‘false’ since the types ‘string’ and ‘number’ have no overlap. even though inside the code we have used == not === , should i be aware of some new configuration or feature of angular 10

its already making no sense

i know i can add single quotes on my number but what is the logic that == behaves like === in html/template.

why there was no error in angular 5 ?
enter image description here

Source: Angular Questions

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.