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

[JS/Flow] Generic type breaks further JSX syntax highlighting #236

Open
phts opened this issue Sep 23, 2019 · 0 comments
Open

[JS/Flow] Generic type breaks further JSX syntax highlighting #236

phts opened this issue Sep 23, 2019 · 0 comments
Labels

Comments

@phts
Copy link
Contributor

phts commented Sep 23, 2019

In the example - root cause is Element<*>. If this type does not have <*> part - then highlighting works OK.

// @flow
import React from 'react';
import type { Element } from 'react';

type PropsType = {
  t: () => {},
  a: string,
};

const c = 'asd';
const d = 'asd';

const MyComp = ({ t, a }: PropsType): Element<*> => (
  <div className={`${d}-wrapper`}>
    <span t={t(c)} a={a} />
    <div className={`${d}-form`} />
  </div>
);

export default MyComp;

With <*>:

Screenshot 2019-09-23 at 12 35 34

Without:

Screenshot 2019-09-23 at 12 35 43

@borela borela added the bug label Sep 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants