Closed
Description
TypeScript Version: 2.3.3
Code
interface Animal {
name: string;
size: {
w?: number;
h?: number;
};
}
var dog: Animal = {
name: 'John',
size: 'asd',
}
And you can open the link from typescript playground.
Expected behavior:
Typing error, because size is not a string, it is an object with specific shape.
Actual behavior:
No errors.
Metadata
Metadata
Assignees
Labels
No labels