Generic type arguments in JSX elements

JSX elements now allow passing type arguments to generic components.

Example

  1. class GenericComponent<P> extends React.Component<P> {
  2. internalProp: P;
  3. }
  4. type Props = { a: number; b: string; };
  5. const x = <GenericComponent<Props> a={10} b="hi"/>; // OK
  6. const y = <GenericComponent<Props> a={10} b={20} />; // Error