You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Effectively a duplicate of #38663. You're using a template literal key instead of a union, but the same thing happens: it is widened all the way to string as per #13948 ( #13948 (comment) ) and then it ends up disappearing in spread due ( #38663 (comment) )
🔎 Search Terms
"template literal" spread, spread "string literal"
🕗 Version & Regression Information
⏯ Playground Link
https://www.typescriptlang.org/play/?ts=5.8.0-dev.20250115#code/MYewdgzgLgBAbgQwE4EsECMA2BTAXDAAxQBMB9AEgG90UBzFMKAXwJgF4YByE0gRgCYAzJwDcAKFCRYEAA5JsCYuxiUAdOsoZg+MAFdMmJgBoYAbUSoMOALr4oSXdibiAFLPmKYEBFBQQAZijYECqmpPjQqGC0tjB6BkwAlGJAA
💻 Code
🙁 Actual behavior
No errors.
spread
is incorrectly inferred as:🙂 Expected behavior
spread
is inferred as:Causing the satisfies test to fail.
Additional information about the issue
Omitting the template literal errors correctly:
Attempting to insert the template literal errors correctly:
The text was updated successfully, but these errors were encountered: