Skip to content

Instantly share code, notes, and snippets.

@also
Last active February 5, 2017 19:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save also/c9a89e4292e80ddd4c26db617f94f40d to your computer and use it in GitHub Desktop.
Save also/c9a89e4292e80ddd4c26db617f94f40d to your computer and use it in GitHub Desktop.
Flow: some property. Property not found in object literal
$ yarn flow
yarn flow v0.20.0
$ flow; test $? -eq 0 -o $? -eq 2
b.js:4
  4:   dict: {[key: string]: string},
             ^^^^^^^^^^^^^^^^^^^^^^^ some property. Property not found in
 11:     dict: {'key': 'value'}
               ^^^^^^^^^^^^^^^^ object literal


Found 1 error
✨  Done in 0.26s.
/* @flow */
import {build, type Type} from './b';
(build(): Array<Type>);
/* @flow */
export type Type = {
dict: {[key: string]: string},
};
export function build() {
const values = [];
values.push({
dict: {'key': 'value'}
});
return values;
}
{
"devDependencies": {
"flow-bin": "^0.38.0"
},
"scripts": {"flow": "flow; test $? -eq 0 -o $? -eq 2"}
}
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
flow-bin@^0.38.0:
version "0.38.0"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.38.0.tgz#3ae096d401c969cc8b5798253fb82381e2d0237a"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment