Closed
Description
π Search Terms
String templates doesn't work with nested generics and keyof
π Version & Regression Information
5.2.2, 5.3
β― Playground Link
π» Code
interface A<T extends Record<string, string> {
nested: T
}
function a<T extends A<{id: string}>>(t: T) {
b(t, 'id') // good
b(t, '-id') // Bug?
}
function b<T extends A<any>>(t: T, sort: keyof T['nested'] & string | `-${keyof T['nested'] & string}`) {
}
π Actual behavior
Template string doesn't work as expected
π Expected behavior
The example should compile without error
Additional information about the issue
No response