47 lines
1.6 KiB
Plaintext
47 lines
1.6 KiB
Plaintext
=== tests/cases/compiler/jsxInExtendsClause.tsx ===
|
|
// https://github.com/Microsoft/TypeScript/issues/13157
|
|
declare namespace React {
|
|
>React : typeof React
|
|
|
|
interface ComponentClass<P> { new (): Component<P, {}>; }
|
|
>ComponentClass : ComponentClass<P>
|
|
>P : P
|
|
>Component : Component<A, B>
|
|
>P : P
|
|
|
|
class Component<A, B> {}
|
|
>Component : Component<A, B>
|
|
>A : A
|
|
>B : B
|
|
}
|
|
declare function createComponentClass<P>(factory: () => React.ComponentClass<P>): React.ComponentClass<P>;
|
|
>createComponentClass : <P>(factory: () => React.ComponentClass<P>) => React.ComponentClass<P>
|
|
>P : P
|
|
>factory : () => React.ComponentClass<P>
|
|
>React : any
|
|
>ComponentClass : React.ComponentClass<P>
|
|
>P : P
|
|
>React : any
|
|
>ComponentClass : React.ComponentClass<P>
|
|
>P : P
|
|
|
|
class Foo extends createComponentClass(() => class extends React.Component<{}, {}> {
|
|
>Foo : Foo
|
|
>createComponentClass(() => class extends React.Component<{}, {}> { render() { return <span>Hello, world!</span>; }}) : React.Component<{}, {}>
|
|
>createComponentClass : <P>(factory: () => React.ComponentClass<P>) => React.ComponentClass<P>
|
|
>() => class extends React.Component<{}, {}> { render() { return <span>Hello, world!</span>; }} : () => typeof (Anonymous class)
|
|
>class extends React.Component<{}, {}> { render() { return <span>Hello, world!</span>; }} : typeof (Anonymous class)
|
|
>React.Component : React.Component<{}, {}>
|
|
>React : typeof React
|
|
>Component : typeof React.Component
|
|
|
|
render() {
|
|
>render : () => any
|
|
|
|
return <span>Hello, world!</span>;
|
|
><span>Hello, world!</span> : any
|
|
>span : any
|
|
>span : any
|
|
}
|
|
}) {}
|