Skip to content

Commit

Permalink
docs: add missing spread-exact-type docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus committed Apr 22, 2019
1 parent a41f5f1 commit 6bfb378
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
* [`space-after-type-colon`](#eslint-plugin-flowtype-rules-space-after-type-colon)
* [`space-before-generic-bracket`](#eslint-plugin-flowtype-rules-space-before-generic-bracket)
* [`space-before-type-colon`](#eslint-plugin-flowtype-rules-space-before-type-colon)
* [`spread-exact-type`](#eslint-plugin-flowtype-rules-spread-exact-type)
* [`type-id-match`](#eslint-plugin-flowtype-rules-type-id-match)
* [`type-import-style`](#eslint-plugin-flowtype-rules-type-import-style)
* [`union-intersection-spacing`](#eslint-plugin-flowtype-rules-union-intersection-spacing)
Expand Down Expand Up @@ -4544,6 +4545,31 @@ var x :number = 42;
<a name="eslint-plugin-flowtype-rules-spread-exact-type"></a>
### <code>spread-exact-type</code>
Enforce object types, that are spread to be exact type explicitly.
The following patterns are considered problems:
```js
type bar = {...{test: string}}
// Message: Use $Exact to make type spreading safe.
type foo = {test: number}; type bar = {...foo}
// Message: Use $Exact to make type spreading safe.
```
The following patterns are not considered problems:
```js
type bar = {...$Exact<{test: string}>}
type foo = {test: number}; type bar = {...$Exact<foo>}
```
<a name="eslint-plugin-flowtype-rules-type-id-match"></a>
### <code>type-id-match</code>
Expand Down

0 comments on commit 6bfb378

Please sign in to comment.