-
Notifications
You must be signed in to change notification settings - Fork 362
test: introducing flowtype exact object types #554
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a great feature! Let's do it. Do you want to start with smaller patches like this, maybe one or two commands at a time? That might make it easier to integrate in a way that doesn't introduce too many conflicts while other development happens.
export type ExtensionManifest = { | ||
name: string, | ||
version: string, | ||
applications: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this be applications?
since it's optional?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed this to applications?
already upstream in #639
manifestData: manifestWithoutApps, | ||
artifactsDir: tmpDir.path(), | ||
}, { | ||
manifestData: manifestWithoutApps, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sold! :) This is a great catch.
@kumar303 exactly, that's the reason why I only did it on a single file.
Then move the commit that applies the exact object types to the How about creating a new issue to specifically track the progress of this group of pull requests? |
The new version of |
Yes, that would be helpful |
@shubheksha beat you to it! I believe #726 covers everything that was added here, right? |
@kumar303 yes, definitely! 🙌 @shubheksha Thank you so much! ❤️ |
Flow supports a new syntax for exact object types, starting from v.0.32.0:
Using the new
{| prop: type |}
syntax, flow checks that the objects of this type contains only exactly the defined properties, and using this additional restriction (where it is appropriate), flow will be able to catch additional classes of issues early.This PR contains an initial proposal of the changes needed to introduce this new flowtype feature, and it is composed of: