File: tsxReactComponentWithDefaultTypeParameter2.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 (33 lines) | stat: -rw-r--r-- 635 bytes parent folder | download | duplicates (5)
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
=== tests/cases/conformance/jsx/file.tsx ===
import React = require('react');
>React : typeof React

interface Prop {
    a: number,
>a : number

    b: string
>b : string
}

declare class MyComp<P = Prop> extends React.Component<P, {}> {
>MyComp : MyComp<P>
>React.Component : React.Component<P, {}>
>React : typeof React
>Component : typeof React.Component

    internalProp: P;
>internalProp : P
}

let x = <MyComp />
>x : JSX.Element
><MyComp /> : JSX.Element
>MyComp : typeof MyComp

let x1 = <MyComp a="hi"/>
>x1 : JSX.Element
><MyComp a="hi"/> : JSX.Element
>MyComp : typeof MyComp
>a : string