babel-plugin-transform-class-properties: Ignore type annotations when looking for name collisions (#6082)

This commit is contained in:
Andy
2017-08-11 08:27:48 -07:00
committed by Brian Ng
parent 218f191a59
commit 9243c78ea2
4 changed files with 19 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
class C {
// Output should not use `_initialiseProps`
x: T;
y = 0;
constructor(T) {}
}

View File

@@ -0,0 +1,7 @@
class C {
// Output should not use `_initialiseProps`
constructor(T) {
this.y = 0;
}
}

View File

@@ -0,0 +1,3 @@
{
"plugins": ["transform-typescript", "transform-class-properties"]
}