File: reactHOCSpreadprops.types

package info (click to toggle)
node-typescript 3.3.3333-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 324,548 kB
  • sloc: makefile: 6; sh: 3
file content (31 lines) | stat: -rw-r--r-- 1,032 bytes parent folder | download
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
=== tests/cases/compiler/reactHOCSpreadprops.tsx ===
/// <reference path="react16.d.ts" />
import React = require("react");
>React : typeof React

function f<P>(App: React.ComponentClass<P> | React.StatelessComponent<P>): void {
>f : <P>(App: React.ComponentClass<P, any> | React.StatelessComponent<P>) => void
>App : React.ComponentClass<P, any> | React.StatelessComponent<P>
>React : any
>React : any

    class C extends React.Component<P & { x: number }> {
>C : C
>React.Component : React.Component<P & { x: number; }, {}, any>
>React : typeof React
>Component : typeof React.Component
>x : number

        render() {
>render : () => JSX.Element

            return <App {...this.props} />;
><App {...this.props} /> : JSX.Element
>App : React.ComponentClass<P, any> | React.StatelessComponent<P>
>this.props : Readonly<{ children?: React.ReactNode; }> & Readonly<P & { x: number; }>
>this : this
>props : Readonly<{ children?: React.ReactNode; }> & Readonly<P & { x: number; }>
        }
    }
}