Open sparecycles opened 1 month ago
It's not about template literal types but rather about NoInfer
used in a conditional type. This already doesn't work correctly:
function h<const A>(a: A, b: A extends string ? NoInfer<A> : never) {}
h("foo", "bar");
@Andarist you're absolutely right. Thanks for the fast fix!
🔎 Search Terms
NoInfer string template
🕗 Version & Regression Information
This issue exists in every Playground-accessible version that has
NoInfer
.⏯ Playground Link
here
💻 Code
but
🙁 Actual behavior
no type error on
g()
above, because theA
type is being inferred via the string template in spite of theNoInfer
marker.🙂 Expected behavior
Both of the example calls should be recognized as wrong?
Additional information about the issue
Also tried
no luck.