Closed
Description
TypeScript Version: 2.1.6
Code
interface A {
a?: string
}
const a1: A = { b: 2 } // correct: error "Object literal may only specify known properties"
const a2: A = () => { } // incorrect: no error
Expected behavior:
Call signature is treated like an excessive property, so both lines emit an error.
Actual behavior:
Only properties are checked, so only first line emits an error.
See #3755