Closed
Description
Bug Report
π Search Terms
This condition will always return 'false'
π Version & Regression Information
- This changed between versions 4.2.3 and 4.3.5
β― Playground Link
π» Code
declare const foo: `foo${number}`
foo === 'bar' // no error even though types are incompatible
const bar: `foo${number}` = 'bar' //error: Type '"bar"' is not assignable to type '`foo${number}`'
π Actual behavior
no error when comparing the incompatible types
π Expected behavior
the same error that occurs when you do the same thing in typescript <=4.2.3
This condition will always return 'false' since the types '`foo${number}`' and '"bar"' have no overlap.(2367)