This repo demonstrates that TypeScript and Flow can be happily married into one repo for the purpose of migration from one to the other.
"allowJS": true,
"include": [
"./src/**/*.ts",
"./src/**/*.tsx"
],
"exclude": [
"./src/**/*.js",
"./src/**/*.jsx"
]
ERROR: Type annotations can only be used in TypeScript files.
./src/examples/FlowFile.js ./src/examples/FlowFile_Commented.js
function foo(x/*: ?number*/)/*: string*/{
if (x) {
return x.toString();
}
return "default string";
}
./.vscode/settings.test.json (rename to settings.json)
{
"javascript.validate.enable": false
}
npm install
npm run flow
npm start