refactor: types refactor

This commit is contained in:
Evan You
2018-10-08 18:09:13 -04:00
parent ba918b5afe
commit d22b71b27e
11 changed files with 74 additions and 64 deletions

View File

@@ -6,9 +6,7 @@ describe('attribute fallthrough', () => {
const nativeClick = jest.fn()
const childUpdated = jest.fn()
class Hello extends Component<{
count: number
}> {
class Hello extends Component<{}, { count: number }> {
data() {
return {
count: 0
@@ -29,7 +27,7 @@ describe('attribute fallthrough', () => {
}
}
class Child extends Component<{}, { foo: number }> {
class Child extends Component<{ foo: number }> {
updated() {
childUpdated()
}
@@ -75,7 +73,7 @@ describe('attribute fallthrough', () => {
const nativeClick = jest.fn()
const childUpdated = jest.fn()
class Hello extends Component<{ count: number }> {
class Hello extends Component<{}, { count: number }> {
data() {
return {
count: 0
@@ -96,7 +94,7 @@ describe('attribute fallthrough', () => {
}
}
class Child extends Component<{}, { foo: number }> {
class Child extends Component<{ foo: number }> {
static options = {
props: {
foo: Number
@@ -149,7 +147,7 @@ describe('attribute fallthrough', () => {
const childUpdated = jest.fn()
const grandChildUpdated = jest.fn()
class Hello extends Component<{ count: number }> {
class Hello extends Component<{}, { count: number }> {
data() {
return {
count: 0
@@ -184,7 +182,7 @@ describe('attribute fallthrough', () => {
}
}
class GrandChild extends Component<{}, { foo: number }> {
class GrandChild extends Component<{ foo: number }> {
static options = {
props: {
foo: Number