File: jsxInExtendsClause.types

package info (click to toggle)
node-typescript 2.1.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 203,952 kB
  • ctags: 52,987
  • sloc: sh: 11; makefile: 5
file content (46 lines) | stat: -rw-r--r-- 1,629 bytes parent folder | download | duplicates (2)
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
=== 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
  }
}) {}