// @flow var React = require('react'); class CustomComponent extends React.Component { props: { prop: string }; } var a: React.Element<{prop: string}> = ; var b: React.Element<{prop1: string}> = ; // Error: Props<{prop}> ~> Props<{prop1}> // Since intrinsics are typed as `any` out of the box, we can pass any // attributes to intrinsics! var c: React.Element =
; // However, we don't allow such elements to be viewed as React elements with // different attributes. var d: React.Element<{doesntmatch: string}> =
; // No error as long as expectations are consistent, though. var e: React.Element<{not_a_real_attr: string}> =
;