54 lines
1.1 KiB
Plaintext
54 lines
1.1 KiB
Plaintext
=== tests/cases/conformance/jsx/react.d.ts ===
|
|
|
|
declare module 'react' {
|
|
class Component<T, U> { }
|
|
>Component : Component<T, U>
|
|
>T : T
|
|
>U : U
|
|
}
|
|
|
|
=== tests/cases/conformance/jsx/app.tsx ===
|
|
import * as React from 'react';
|
|
>React : typeof React
|
|
|
|
// Should see var button_1 = require('./button') here
|
|
import { Button } from './button';
|
|
>Button : typeof Button
|
|
|
|
export class App extends React.Component<any, any> {
|
|
>App : App
|
|
>React.Component : React.Component<any, any>
|
|
>React : typeof React
|
|
>Component : typeof React.Component
|
|
|
|
render() {
|
|
>render : () => any
|
|
|
|
return <Button />;
|
|
><Button /> : any
|
|
>Button : typeof Button
|
|
}
|
|
|
|
}
|
|
|
|
=== tests/cases/conformance/jsx/button.tsx ===
|
|
import * as React from 'react';
|
|
>React : typeof React
|
|
|
|
export class Button extends React.Component<any, any> {
|
|
>Button : Button
|
|
>React.Component : React.Component<any, any>
|
|
>React : typeof React
|
|
>Component : typeof React.Component
|
|
|
|
render() {
|
|
>render : () => any
|
|
|
|
return <button>Some button</button>;
|
|
><button>Some button</button> : any
|
|
>button : any
|
|
>button : any
|
|
}
|
|
|
|
}
|