retain return types on ObjectMethods in transform-es2015-shorthand-properties (#4670)

This commit is contained in:
Dan Harper
2016-10-05 02:32:43 +01:00
committed by Henry Zhu
parent 9e6ac7b693
commit 9e17aaf043
10 changed files with 48 additions and 1 deletions

View File

@@ -0,0 +1,6 @@
// @flow
var obj = {
method(a: string): number {
return 5 + 5;
}
};

View File

@@ -0,0 +1,6 @@
// @flow
var obj = {
method: function (a /*: string*/) /*: number*/ {
return 5 + 5;
}
};

View File

@@ -0,0 +1,3 @@
{
"plugins": ["transform-es2015-shorthand-properties", "transform-flow-comments"]
}