
This is a:
Which concerns:
Code
// @flow
function foo<X>() {
let bar: X
}
.babelrc
{
"presets": ["es2015"],
"plugins": [
"transform-decorators-legacy",
["flow-runtime", {"assert": false}]
]
}
What is the current behaviour?
X is undefined in the output code below at let _barType = X:
import t from "flow-runtime";
function foo() {
let _barType = X,
bar;
}
t.annotate(foo, t.function(_fn => {
const X = _fn.typeParameter("X");
return [];
}));
What is the expected behaviour?
Either babel-plugin-flow-runtime doesn't create _barType, or it inserts const X = t.typeParameter("X") above let _barType it despite the "assert": false in the plugin options.
Which package versions are you using?
├── babel-core@6.26.0
├── babel-plugin-flow-runtime@0.15.0
├── babel-preset-es2015@6.24.0
IssueHunt Summary
Backers (Total: $40.00)
Submitted pull Requests
Tips
This is a:
Which concerns:
Code
.babelrcWhat is the current behaviour?
Xis undefined in the output code below atlet _barType = X:What is the expected behaviour?
Either
babel-plugin-flow-runtimedoesn't create_barType, or it insertsconst X = t.typeParameter("X")abovelet _barTypeit despite the"assert": falsein the plugin options.Which package versions are you using?
IssueHunt Summary
Backers (Total: $40.00)
Submitted pull Requests
Become a backer now!
Or submit a pull request to get the deposits!
Tips