-
Notifications
You must be signed in to change notification settings - Fork 13k
Closed
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue
Milestone
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
Metadata
Metadata
Assignees
Labels
BugA bug in TypeScriptA bug in TypeScriptFix AvailableA PR has been opened for this issueA PR has been opened for this issue