1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
=== tests/cases/compiler/spellingSuggestionJSXAttribute.tsx ===
/// <reference path="react16.d.ts" />
import * as React from "react";
>React : typeof React
function MyComp2(props: { className?: string, htmlFor?: string }) {
>MyComp2 : (props: { className?: string; htmlFor?: string;}) => any
>props : { className?: string; htmlFor?: string; }
>className : string
>htmlFor : string
return null!;
>null! : null
>null : null
}
class MyComp extends React.Component<{ className?: string, htmlFor?: string }> { }
>MyComp : MyComp
>React.Component : React.Component<{ className?: string; htmlFor?: string; }, {}, any>
>React : typeof React
>Component : typeof React.Component
>className : string
>htmlFor : string
<a class="" />;
><a class="" /> : JSX.Element
>a : any
>class : string
<a for="" />; // should have no fix
><a for="" /> : JSX.Element
>a : any
>for : string
<label for="" />;
><label for="" /> : JSX.Element
>label : any
>for : string
<label for="" class="" />;
><label for="" class="" /> : JSX.Element
>label : any
>for : string
>class : string
<MyComp class="" />;
><MyComp class="" /> : JSX.Element
>MyComp : typeof MyComp
>class : string
<MyComp2 class="" />;
><MyComp2 class="" /> : JSX.Element
>MyComp2 : (props: { className?: string; htmlFor?: string; }) => any
>class : string
<MyComp for="" />;
><MyComp for="" /> : JSX.Element
>MyComp : typeof MyComp
>for : string
<MyComp2 for="" />;
><MyComp2 for="" /> : JSX.Element
>MyComp2 : (props: { className?: string; htmlFor?: string; }) => any
>for : string
|