WarnerHooh / babel-plugin-parameter-decorator

Function parameter decorator transform plugin for babel v7, just like typescript.
34 stars 9 forks source link

Mention usage of `onlyRemoveTypeImports` and add test for it #19

Closed Skn0tt closed 4 years ago

Skn0tt commented 4 years ago

Using multiple decorators will break code b/c the @babel/preset-typescript unexpectedly elides related imports (see https://github.com/babel/babel/issues/9838#issuecomment-601606360 for reference). Setting onlyRemoveTypeImports to true will fix that behaviour.

This PR adds a test case for and mentions it in the README.

WarnerHooh commented 4 years ago

Thanks for sharing this, which is really helpful!

Skn0tt commented 4 years ago

You're welcome :)

WarnerHooh commented 4 years ago

Merged and just released a new version. Hope you enjoy it :)