diff --git a/CHANGELOG.md b/CHANGELOG.md index cf49869d6b..66c6260d56 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,11 @@ _Note: Gaps between patch versions are faulty/broken releases._ See [CHANGELOG - 6to5](CHANGELOG-6to5.md) for the pre-4.0.0 version changelog. +## 5.5.1 + + * **Bug Fix** + * Remove `ClassProperty` nodes always in the `Flow` transformer. This is fine now since. + ## 5.5.0 * **Bug Fix** diff --git a/src/babel/transformation/transformers/other/flow.js b/src/babel/transformation/transformers/other/flow.js index 4e77a3946e..54336d640c 100644 --- a/src/babel/transformation/transformers/other/flow.js +++ b/src/babel/transformation/transformers/other/flow.js @@ -7,7 +7,9 @@ export function Flow(node) { } export function ClassProperty(node) { - node.typeAnnotation = null; + // todo: uncomment when/if class properties are supported by default. + // node.typeAnnotation = null; + this.dangerouslyRemove(); } export function Class(node) { diff --git a/test/core/fixtures/transformation/flow/strip-type-annotations/expected.js b/test/core/fixtures/transformation/flow/strip-type-annotations/expected.js index 277f1ad2f0..6a52c762fc 100644 --- a/test/core/fixtures/transformation/flow/strip-type-annotations/expected.js +++ b/test/core/fixtures/transformation/flow/strip-type-annotations/expected.js @@ -64,14 +64,8 @@ class Foo8 { "bar"() {} } function foo(requiredParam, optParam) {} -class Foo9 { - prop1; - prop2; -} -class Foo10 { - static prop1; - prop2; -} +class Foo9 {} +class Foo10 {} var x = 4; class Array { concat(items) {}