Skip to content

Instantly share code, notes, and snippets.

@hakobe
Last active January 13, 2018 12:28
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 hakobe/3e05015b9e3b1538c8326e4aa88a635f to your computer and use it in GitHub Desktop.
Save hakobe/3e05015b9e3b1538c8326e4aa88a635f to your computer and use it in GitHub Desktop.

First, generate .flow file.

$ yarn run flow gen-flow-files --out-dir . greeting.js

Genereted file is almost the same as greeting.js.flow.

Next, run flow and get an error like below.

Error: greeting.js.flow:6
  6: declare export var greeting: "\227\129\147\227\130\147\227\129\171\227\129\161\227\129\175";
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Octal literals are not allowed in strict mode.
[ignore]
[include]
[libs]
[lints]
[options]
[strict]
// @flow
export const greeting: "こんにちは" = "こんにちは"
// @flow
// This .flow file is generated by commnd below.
// $ yarn run flow gen-flow-files --out-dir . greeting.js
declare export var greeting: "\227\129\147\227\130\147\227\129\171\227\129\161\227\129\175";
{
"dependencies": {
"flow-bin": "^0.63.1"
}
}
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
flow-bin@^0.63.1:
version "0.63.1"
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.63.1.tgz#ab00067c197169a5fb5b4996c8f6927b06694828"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment