esbuild-plugin-flow icon indicating copy to clipboard operation
esbuild-plugin-flow copied to clipboard

Allow not checking @flow in comments

Open hanayashiki opened this issue 4 years ago • 7 comments

Some .flow files are not annotated but needs transformation, like react-native. So it would be nice if we can add a { force: boolean }!

hanayashiki avatar May 11 '21 00:05 hanayashiki

Ok, it is done. Version 0.3.1 I hope you have success with Esbuild in react-native.

dalcib avatar May 11 '21 11:05 dalcib

Ok, it is done. Version 0.3.1 I hope you have success with Esbuild in react-native.

Not totally successful, flow-remove-types seems to have a bug with

static +x: "literal" = "literal"

It leaves the + there. But using babel-flow works

After removing that + by hand, it is successful

hanayashiki avatar May 11 '21 14:05 hanayashiki

Ok, thanks. Fixed on v0.3.2

dalcib avatar May 11 '21 17:05 dalcib

Ok, thanks. Fixed on v0.3.2

i meant that should really be fixed by flow remove types

The current workaround does not take syntax into account

hanayashiki avatar May 11 '21 18:05 hanayashiki

when i have time i'd like to give them a PR or something to fix the problem. Anyway, flow is dead, don't expect they'll merge it

hanayashiki avatar May 12 '21 07:05 hanayashiki

Hi, nanayahsiki, can you please explain what this syntax means? static +x: "literal" = "literal"? I am not familiar with that syntax involving the + sign. Does the following code show the same syntax?

class MyClass
  static +myStaticMember: "SomeLiteralValue" = "SomeLiteralValue";
}

What does the + in front of the identifier do? Thanks!

carlgieringer avatar Jun 13 '21 15:06 carlgieringer

Hi, nanayahsiki, can you please explain what this syntax means? static +x: "literal" = "literal"? I am not familiar with that syntax involving the + sign. Does the following code show the same syntax?

class MyClass
  static +myStaticMember: "SomeLiteralValue" = "SomeLiteralValue";
}

What does the + in front of the identifier do? Thanks!

yes, that's what i meant. It is just a flow syntax. I don't use flow but it probably means 'public'.

flow-remove-types itself does not properly handle this syntax, it leaves it there.

hanayashiki avatar Jun 13 '21 22:06 hanayashiki