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 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
=== tests/cases/compiler/react.d.ts ===
export = React;
>React : typeof React
export as namespace React;
>React : typeof React
declare namespace React {
>React : typeof React
function createClass(spec: any): ClassicComponentClass;
>createClass : (spec: any) => ClassicComponentClass
>spec : any
interface ClassicComponentClass {
new (props?: any): ClassicComponentClass;
>props : any
}
}
declare global {
>global : any
namespace JSX {
interface ElementAttributesProperty { }
}
}
=== tests/cases/compiler/src/components/TabBar.js ===
export default React.createClass({
>React.createClass({ render() { return ( null ); }}) : import("tests/cases/compiler/react").ClassicComponentClass
>React.createClass : (spec: any) => import("tests/cases/compiler/react").ClassicComponentClass
>React : typeof React
>createClass : (spec: any) => import("tests/cases/compiler/react").ClassicComponentClass
>{ render() { return ( null ); }} : { render(): any; }
render() {
>render : () => any
return (
>( null ) : null
null
>null : null
);
}
});
=== tests/cases/compiler/src/modules/navigation/NavigationView.js ===
import TabBar from '../../components/TabBar';
>TabBar : import("tests/cases/compiler/react").ClassicComponentClass
import {layout} from '../../utils/theme'; // <- DO NOT DROP this import
>layout : any
const x = <TabBar height={layout.footerHeight} />;
>x : error
><TabBar height={layout.footerHeight} /> : error
>TabBar : import("tests/cases/compiler/react").ClassicComponentClass
>height : error
>layout.footerHeight : error
>layout : any
>footerHeight : any
|