Skip to content

Instantly share code, notes, and snippets.

@hakobe
Last active Jan 13, 2018
Embed
What would you like to do?

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