-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
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
Remove unsealed objects #7424
Comments
Probably as lint rule? |
@TrySound I believe that's in relation to exact objects, not unsealed objects but maybe there's some implications with defaulting to exact objects on unsealed objects I'm not understanding. @goodmind A flow lint rule would be great! But there's still the problem of having to do const a: { foo: string} = {}; // No error?! |
Wow finally I understand all the weird bugs! If you were allowed to assign any property to inexact object, then reading it back would be any but you wouldn’t have to make an empty object be weird in its definition.. wouldn’t that still allow unsealed usage untyped but not lead to many problems for people trying to use flow? |
|
this is very important as unsealed objects are common only in facebook code base and no one else is familiar with this concept specially those who want to have sound type system |
unsealed objects seem to be unintuitive to most users new to Flow. It also seems to be a common source of unsoundness in mature projects.
The text was updated successfully, but these errors were encountered: