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
Add flow types for browserslist #5340
Add flow types for browserslist #5340
Conversation
|
flow-libs/browserslist.js.flow
Outdated
| declare module.exports: {| | ||
| (browsers: string | Array<string>): Array<string>, | ||
| parseConfig(configResult: ConfigResult): Promise<?BrowserslistConfig>, | ||
| loadConfig({[path: FilePath]: FilePath, ...}): string, |
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.
the first argument, options, is defined in browserlist's js api docs: https://github.com/browserslist/browserslist#js-api
| @@ -1,4 +1,5 @@ | |||
| // @flow | |||
| // @flow strict-local | |||
| // flowlint unsafe-getters-setters: off | |||
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.
@devongovett @mischnic what do you think of allowing getters and setters globally? They do technically introduce potential unsoundness.
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.


Adds a flow type lib def for
browserslist.Run
yarn flowto ensure that there are no flow errors.@padmaia @wbinnssmith