Fixed incorrect flow type output

For an optional property, the property can either be undefined, otherwise must be any value that is not null. The example was showing  the incorrect output of a setting the value to null.
This commit is contained in:
Tom Arrell 2018-04-03 16:56:13 +12:00 committed by GitHub
parent 9bb866cf36
commit 92b16c9132
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -133,7 +133,7 @@ type Album = {
```js ```js
const a: Album = { } // ✓ OK const a: Album = { } // ✓ OK
a.name = 'Blue' // ✓ OK a.name = 'Blue' // ✓ OK
a.name = null // ✓ OK a.name = null // ✓ Error
a.name = undefined // ✓ OK a.name = undefined // ✓ OK
``` ```