Closed
Description
TypeScript Version: 2.4.2
Code
interface IState {
foo: number;
}
export const fun: (state: IState) => IState = (state) => {
return { ...state, bar: 2 };
};
Expected behavior:
Object literal may only specify known properties, and 'bar' does not exist in type 'IState'.
Actual behavior:
No error