We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
The text was updated successfully, but these errors were encountered:
Looks like it treats literal string as object, and it matches declared object shape which may be empty. I'm not sure if this is expected behavior.
Sorry, something went wrong.
Sorry, I've just found the same issue In Progress) #7485
No branches or pull requests
Uh oh!
There was an error while loading. Please reload this page.
TypeScript Version: 2.3.3
Code
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.
The text was updated successfully, but these errors were encountered: