Skip to content

Commit e19beb7

Browse files
authored
Merge pull request #13 from philip-peterson/typings-args
Add TS typings for `...args`
2 parents 737e1e2 + 7e57dfe commit e19beb7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

typings/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ type AsyncChildren<T> = ((state: AsyncState<T>) => React.ReactNode) | React.Reac
44

55
interface AsyncProps<T> {
66
promiseFn?: (props: object) => Promise<T>
7-
deferFn?: (...args) => Promise<T>
7+
deferFn?: (...args: any[]) => Promise<T>
88
watch?: any
99
initialValue?: T
1010
onResolve?: (data: T) => void
@@ -20,7 +20,7 @@ interface AsyncState<T> {
2020
startedAt?: Date
2121
finishedAt?: Date
2222
cancel: () => void
23-
run: (...args) => Promise<T>
23+
run: (...args: any[]) => Promise<T>
2424
reload: () => void
2525
setData: (data: T, callback?: () => void) => T
2626
setError: (error: Error, callback?: () => void) => Error

0 commit comments

Comments
 (0)