TypeScript/tests/cases/conformance/jsx/tsxGenericAttributesType8.tsx

16 lines
404 B
TypeScript
Raw Normal View History

2017-05-12 07:40:34 +02:00
// @filename: file.tsx
// @jsx: preserve
// @noLib: true
// @skipLibCheck: true
2017-05-12 07:40:34 +02:00
// @libFiles: react.d.ts,lib.d.ts
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} />;
}