Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

metro-react-native-babel-preset support TypeScript namespace #505

Conversation

bolasblack
Copy link
Contributor

@bolasblack bolasblack commented Jan 3, 2020

Summary

Because the namespace is really useful in many case, so I try to make metro-react-native-babel-preset to support the namespace keyword.

I added the allowNamespaces option to @babel/plugin-transform-typescript.

https://babeljs.io/docs/en/babel-plugin-transform-typescript#impartial-namespace-support

Test plan

I linked metro-react-native-babel-preset to a TypeScript react-native project, and written a namespace, then checked the code metro outputed, it is ok.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 3, 2020
@codecov-io
Copy link

codecov-io commented Jan 3, 2020

Codecov Report

Merging #505 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #505   +/-   ##
=======================================
  Coverage   84.07%   84.07%           
=======================================
  Files         175      175           
  Lines        5864     5864           
  Branches      973      973           
=======================================
  Hits         4930     4930           
  Misses        822      822           
  Partials      112      112
Impacted Files Coverage Δ
...etro-react-native-babel-preset/src/configs/main.js 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 984aab8...4082024. Read the comment docs.

@bolasblack bolasblack force-pushed the feat/babel-preset-support-ts-namespace branch from 4b38c61 to f7d48ed Compare January 3, 2020 12:52
@bolasblack bolasblack force-pushed the feat/babel-preset-support-ts-namespace branch from f7d48ed to 4082024 Compare January 3, 2020 13:00
Copy link
Contributor

@cpojer cpojer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for adding this flag!

Copy link
Contributor

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cpojer is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@cpojer merged this pull request in 405b1c5.

@bolasblack bolasblack deleted the feat/babel-preset-support-ts-namespace branch January 10, 2020 04:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants