2017-05-01 22:19:06 +02:00
|
|
|
// @filename: file.tsx
|
|
|
|
// @jsx: preserve
|
|
|
|
// @module: amd
|
|
|
|
// @noLib: true
|
2017-10-04 23:43:35 +02:00
|
|
|
// @skipLibCheck: true
|
2017-05-01 22:19:06 +02:00
|
|
|
// @libFiles: react.d.ts,lib.d.ts
|
|
|
|
|
|
|
|
import React = require('react')
|
|
|
|
|
|
|
|
interface MyComponentProp {
|
|
|
|
values: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
function MyComponent<T = MyComponentProp>(attr: T) {
|
|
|
|
return <div>attr.values</div>
|
|
|
|
}
|
|
|
|
|
|
|
|
// OK
|
|
|
|
let i = <MyComponent values />; // We infer type arguments here
|
|
|
|
let i1 = <MyComponent values="Hello"/>;
|