yuezk / vim-js

💯The most accurate syntax highlighting plugin for JavaScript and Flow.js
MIT License
140 stars 8 forks source link

Highlight broken when using flow generic types #20

Open miuirussia opened 3 years ago

miuirussia commented 3 years ago
image
const pick = <O: Object, K: { [string]: 0 }>(obj: O, ks: K): $Pick<O, K> => {
  const result: any = {};
  const keys = Object.keys(ks);
  for (let i = 0, n = keys.length; i < n; i++) {
    const key = keys[i];
    result[key] = obj[key];
  }
  return result;
};

const FormRow = styled.div`
`;

const FormCaption = ({ children }) => (
  <FormCaptionInner>
    <strong>{children}</strong>
  </FormCaptionInner>
);

const FormCaptionInner = styled.div`
  text-align: right;
`;
yuezk commented 3 years ago

It's a valid issue, will try to fix it later.