Closed
Description
π Search Terms
"string literal is not assignable to parameter of type", "generic string literal argument"
π Version & Regression Information
- This changed between versions 5.1.6 and 5.2.2
β― Playground Link
π» Code
function fn<T>(arg: T): T {
return arg;
}
const a = '1';
const b = a + ' 2';
fn(`${b} 3`);
π Actual behavior
Argument of type '`${string} 3`' is not assignable to parameter of type '"1 2 3"'.
π Expected behavior
No errors are expected
Additional information about the issue
No response