-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
DuplicateAn existing issue was already createdAn existing issue was already createdFix AvailableA PR has been opened for this issueA PR has been opened for this issue
Description
TypeScript Version: 2.1.1 / nightly (2.2.0-dev.201xxxxx)
See next code, also in This playground.
Code
interface F {
(p: {a:number}): {a: string}
}
// there are no type check for extra keys
// but F interface has return type
let g: F = ({a}) => ({
a: '5',
b: '',
})
// we need to do that!, but F interface also has return type
let f: F = ({a}): {a: string} => ({
a: '5',
b: '',
})
Expected behavior:
'g' function should be detected as an error, because return type of interface F doesn't have key 'b', just haves 'a' key
Actual behavior:
'g' function doesn't display any error
mquandalle, kimble, thasner, ccorcos, AlexeyMz and 8 more
Metadata
Metadata
Assignees
Labels
DuplicateAn existing issue was already createdAn existing issue was already createdFix AvailableA PR has been opened for this issueA PR has been opened for this issue