1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
//// [file.tsx]
import React = require('react');
declare function Component<T>(props: T) : JSX.Element;
const decorator = function <U>(props: U) {
return <Component {...props} />;
}
const decorator1 = function <U extends {x: string}>(props: U) {
return <Component {...props} x="hi"/>;
}
//// [file.jsx]
"use strict";
exports.__esModule = true;
var React = require("react");
var decorator = function (props) {
return <Component {...props}/>;
};
var decorator1 = function (props) {
return <Component {...props} x="hi"/>;
};
|