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

Strips comments inside types #46

Open
nickretallack opened this issue Apr 5, 2020 · 0 comments
Open

Strips comments inside types #46

nickretallack opened this issue Apr 5, 2020 · 0 comments

Comments

@nickretallack
Copy link

If I run babel --plugins babel-plugin-flow-to-typescript on this file:

type t = [
    number, // comment 1
    number, // comment 2
];

It prints this:

type t = [number, number];

The comments got stripped out.

If I run it on this:

type t = {
    a: number, // comment 1
    b: number, // comment 2
};

I get this:

type t = {
  a: number;
  // comment 1
  b: number;
};

One comment was stripped out and the other was moved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant