We removed support for React PropTypes. All related Flow builtin types like React$PropType$Primitive are deleted. React has deprecated PropTypes since v15.5.
We will now catch errors related to generic indexed access types. Example
Fixed issues with indexed access on interfaces/instances. Access with string literals will now access named properties. example
We now require annotation for computed access of instances, when that access is directly exported.
The return annotation of a function can now reference a parameter name (e.g try-Flow). This may cause new errors if the return type used to reference a name that aliases a parameter name. This will now be captured by the parameter and cause a [value-as-type] error.
We now error when using the name of a variable in its own annotation (e.g. const x: typeof x = ...). An exception is when the name of the variable appears under an object type constructor. For example, the annotation const o: { f: typeof o } = ... is allowed.
Notable bug fixes:
Fix a bug in the previous version that makes declare let/const function scoped. We fixed it to be lexically scoped again.
Library Definitions:
Array.flat will now have better typing support for flattening heterogeneous inputs. e.g. [1, [1,2]].flat() will now correctly have inferred type of Array<number>.
We added support for the following builtin types that are also found in TypeScript:
Fixed a crash when we are trying to produce a quick fix for missing imports. The autofix for missing imports broken in the previous release would be working again now.
v0.208.0
Likely to cause new Flow errors:
Flow will now error on unsupported statements in library definitions, instead of silently ignoring them.
Flow will error more consistently when variables of type any and empty are used as types (e.g. try-Flow)
IDE:
Get definition request will now consistently jump to the name of the definition for ES module exports.
In find local references, if a reference appears in a named import, it will no longer highlight the entire import as reference. Instead, it will only highlight the relevant name.
Notable bug fixes:
Parameter types can now refer to previous parameters in the same parameter list (e.g. function f(x: number, y: typeof x) {})
Report error when a function parameter is redeclared in its body in functions that have default params (e.g. try-Flow)
For all declared names (declare class/var/let/const), we will allow full forward reference. All reads of these values will be considered to be initialized.
Misc:
Changed React.Element to support a second type argument, as supported by React$Element
We removed support for React PropTypes. All related Flow builtin types like React$PropType$Primitive are deleted. React has deprecated PropTypes since v15.5.
We will now catch errors related to generic indexed access types. Example
Fixed issues with indexed access on interfaces/instances. Access with string literals will now access named properties. example
We now require annotation for computed access of instances, when that access is directly exported.
The return annotation of a function can now reference a parameter name (e.g try-Flow). This may cause new errors if the return type used to reference a name that aliases a parameter name. This will now be captured by the parameter and cause a [value-as-type] error.
We now error when using the name of a variable in its own annotation (e.g. const x: typeof x = ...). An exception is when the name of the variable appears under an object type constructor. For example, the annotation const o: { f: typeof o } = ... is allowed.
Notable bug fixes:
Fix a bug in the previous version that makes declare let/const function scoped. We fixed it to be lexically scoped again.
Library Definitions:
Array.flat will now have better typing support for flattening heterogeneous inputs. e.g. [1, [1,2]].flat() will now correctly have inferred type of Array<number>.
We added support for the following builtin types that are also found in TypeScript:
Fixed a crash when we are trying to produce a quick fix for missing imports. The autofix for missing imports broken in the previous release would be working again now.
0.208.0
Likely to cause new Flow errors:
Flow will now error on unsupported statements in library definitions, instead of silently ignoring them.
Flow will error more consistently when variables of type any and empty are used as types (e.g. try-Flow)
IDE:
Get definition request will now consistently jump to the name of the definition for ES module exports.
In find local references, if a reference appears in a named import, it will no longer highlight the entire import as reference. Instead, it will only highlight the relevant name.
Notable bug fixes:
Parameter types can now refer to previous parameters in the same parameter list (e.g. function f(x: number, y: typeof x) {})
Report error when a function parameter is redeclared in its body in functions that have default params (e.g. try-Flow)
For all declared names (declare class/var/let/const), we will allow full forward reference. All reads of these values will be considered to be initialized.
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
Bumps flow-parser from 0.195.0 to 0.209.1.
Release notes
Sourced from flow-parser's releases.
... (truncated)
Changelog
Sourced from flow-parser's changelog.
... (truncated)
Commits
d2f8404
v0.209.1a45f764
drop "experimental" from type_guards flag2e3c531
[docs] type-guards6dd75e3
error on type guards on non-ordinary functions363608f
fix in type guards for methods1c28421
v0.209.04f697f4
Kill support for PropType748f3c1
Fully resolve EvalT results for index access related utility types52e0275
Introduce Type.normalized_property6c5f917
prevent VisitorsRuntime.StructuralMismatch exception in TyDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting
@dependabot rebase
.Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)