Flow / TypeAlias / Insertion is destroying brackets

Author: TheHighriserCreated Aug 6, 2025Updated Aug 6, 2025

ASTExplorer: https://astexplorer.net/#/gist/4064d177155143b87c1c6b6b7c803152/7d32ae9682aa546a8bc4e57d74dc7e64cc0d3dd3

The example is basically from a file coming from React Native: https://github.com/facebook/react-native/blob/main/packages/react-native/Libraries/ReactNative/renderApplication.js#L27

When configured for flow and you are not doing anything, it works. But as soon as something gets inserted (as in the ASTExplorer link), the last bracket gets removed and it is breaking the whole code.

I am doing something wrong? Or is this a bug?