mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-06-05 06:40:35 +08:00
Add dtslint type assertion test.
This commit is contained in:
@@ -5,6 +5,7 @@ interface TOwnProps {
|
||||
username: string;
|
||||
}
|
||||
|
||||
// $ExpectType Component
|
||||
@withRouter
|
||||
class Component extends React.Component<TOwnProps, {}> {
|
||||
render() {
|
||||
@@ -16,4 +17,7 @@ class Component extends React.Component<TOwnProps, {}> {
|
||||
|
||||
const WithRouterTest = () => (<Component username="John" />);
|
||||
|
||||
// $ExpectType Element
|
||||
WithRouterTest();
|
||||
|
||||
export default WithRouterTest;
|
||||
|
||||
Reference in New Issue
Block a user