-
Notifications
You must be signed in to change notification settings - Fork 13.1k
Closed
Labels
DuplicateAn existing issue was already createdAn existing issue was already created
Description
TypeScript Version: 3.9.2
Search Terms:
function type
Code
type GetKeys = <T>(obj: T) => (keyof T)[]
const keys: GetKeys = Object.keysExpected behavior:
The last line should throw an error, cause string[] is not assignable to (keyof T)[]
Actual behavior:
No error
Related Issues:
Maybe that #38879
Metadata
Metadata
Assignees
Labels
DuplicateAn existing issue was already createdAn existing issue was already created