TypeScript Version: 2.1.1 / nightly (2.2.0-dev.201xxxxx)
See next code, also in This playground.
Code
interfaceF{(p: {a:number}): {a: string}}// there are no type check for extra keys// but F interface has return typeletg: F=({a})=>({a: '5',b: '',})// we need to do that!, but F interface also has return typeletf: 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
TypeScript Version: 2.1.1 / nightly (2.2.0-dev.201xxxxx)
See next code, also in This playground.
Code
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