fix regression in transform-flow-comments for class properties (#4623)

This commit is contained in:
Dan Harper
2016-10-01 05:56:09 +01:00
committed by Henry Zhu
parent 46339463bd
commit 0e02a18216
8 changed files with 38 additions and 1 deletions

View File

@@ -0,0 +1,4 @@
class X {
a: number
b: ?string
}

View File

@@ -0,0 +1,4 @@
class X {
/*:: a: number*/
/*:: b: ?string*/
}

View File

@@ -0,0 +1,5 @@
{
"plugins": [
"transform-flow-comments"
]
}

View File

@@ -0,0 +1,5 @@
class X {
a: number = 2
b: ?string = '3'
c: ?number
}

View File

@@ -0,0 +1,7 @@
class X {
constructor() {
this.a = 2;
this.b = '3';
}
}

View File

@@ -0,0 +1,6 @@
{
"plugins": [
"transform-flow-comments",
"transform-class-properties"
]
}

View File

@@ -1,5 +1,5 @@
class X {
foo = 2;
bar /*: number*/ = 3;
baz /*: ?string*/;
/*:: baz: ?string*/
}