You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The type DataFactory requires that if bingo is provided, it should be a number. As can be seen in the export, it's a string.
On flow.org, that results in quite an expressive error:
9: export default ({
^ object literal. This type is incompatible with
17: } : ModuleType)
^ object type
Property `data` is incompatible:
11: data () {
^ function. This type is incompatible with
6: data: DataFactory
^ function type
This parameter is incompatible:
12: return {
^ object literal. This type is incompatible with
2: type DataFactory = () => { msg: string, bingo?: number }
^ object type
Property `bingo` is incompatible:
14: bingo: 'string'
^ string. This type is incompatible with
2: type DataFactory = () => { msg: string, bingo?: number }
^ number
Where as with eslint, I get:
> yarn lint --no-color --format codeframe
yarn run v1.3.2
$ eslint --ext .js,.vue src --no-color --format codeframe
error: object literal: This type is incompatible with 'object type'. See line 17 (flowtype-errors/show-errors) at src\components\HelloWorld.vue:33:17:
31 | }
32 |
> 33 | export default ({
| ^
34 | name: 'HelloWorld',
35 | data () {
36 | return {
1 error found.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Which appears to be the first message reported (matches the one on flow.org), though, the least descriptive one.
Is it a configuration error or a bug or missing feature or...?
The text was updated successfully, but these errors were encountered:
I am setting up Vue environment with webpack, flow and eslint and testing out how it works.
Apparently, it didn't take much time to hit an interesting case.
Code:
Interactive version @ flow.org
The type
DataFactory
requires that ifbingo
is provided, it should be anumber
. As can be seen in the export, it's astring
.On flow.org, that results in quite an expressive error:
Where as with
eslint
, I get:Which appears to be the first message reported (matches the one on flow.org), though, the least descriptive one.
Is it a configuration error or a bug or missing feature or...?
The text was updated successfully, but these errors were encountered: