We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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.1.4
Code
interface State { num: number } function setState(state: Partial<State>) { } setState((a, b) => ({ x: 7 })) // no errors
Expected behavior: Does not compile. Actual behavior: Compiles without errors.
The text was updated successfully, but these errors were encountered:
Duplicate of #12936
Sorry, something went wrong.
Not sure if this is really a duplicate of exact type proposal, because this code is checked correctly:
setState({ a: 1 }) // Object literal may only specify known properties, and 'a' does not exist in type 'Partial<State>'.
U are correct sort about that. This is a duplicate of #7485 and should be fixed by #16047
No branches or pull requests
TypeScript Version: 2.1.4
Code
Expected behavior:
Does not compile.
Actual behavior:
Compiles without errors.
The text was updated successfully, but these errors were encountered: