Closed
Description
π Search Terms
Template literal type reduction
π Version & Regression Information
This changed in 5.5-beta (as reported in #58685).
β― Playground Link
π» Code
const enum E { a = "a", b = "b" };
type Stringify<T extends string> = `${T}`;
let z1: `${E}` = "a"; // Ok
let z2: Stringify<E> = "a"; // Error!
π Actual behavior
Error as indicated.
π Expected behavior
No error.
Additional information about the issue
This is a regression from 5.4.5. Error is caused by reduction introduced in #55371.