Bug Report
🔎 Search Terms
intersection template literals
🕗 Version & Regression Information
- This changed between versions 5.0 and nightly
⏯ Playground Link
Playground Link
💻 Code
type MaybeCat = `c${string}` & `${string}t`;
type MaybeScats = `s${MaybeCat}s`;
declare var x: MaybeScats;
x = "scats"; // should be OK
x = "scas"; // should error
🙁 Actual behavior
In 5.0, neither error, even though the second one should.
In nightly, after #52836, both error.
🙂 Expected behavior
First one is okay, second is an error.
Noted in: #53406 (review)
Unsure if this is a regression per-se; neither behavior is really right, I just managed to change it and expose what I believe is a new bug to do with how we handle template literals.
Bug Report
🔎 Search Terms
intersection template literals
🕗 Version & Regression Information
⏯ Playground Link
Playground Link
💻 Code
🙁 Actual behavior
In 5.0, neither error, even though the second one should.
In nightly, after #52836, both error.
🙂 Expected behavior
First one is okay, second is an error.
Noted in: #53406 (review)
Unsure if this is a regression per-se; neither behavior is really right, I just managed to change it and expose what I believe is a new bug to do with how we handle template literals.