Skip to content
This repository was archived by the owner on Sep 21, 2019. It is now read-only.

Commit 2720354

Browse files
author
Athena Yao
committed
Add test for defaultProps
1 parent 1e17c1b commit 2720354

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
class SomeComponent extends React.Component<{
2+
foo: number;
3+
}, {
4+
bar: string;
5+
}> {
6+
static propTypes = { foo: React.PropTypes.string };
7+
static defaultProps = { foo: 'bar' };
8+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
class SomeComponent extends React.Component<
2+
{
3+
foo: number,
4+
},
5+
{
6+
bar: string,
7+
},
8+
> {
9+
static defaultProps = { foo: 'bar' };
10+
}

0 commit comments

Comments
 (0)