Skip to content

Commit 099f880

Browse files
committed
Fix type signature for initialValue.
1 parent 9ef7c4d commit 099f880

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export interface AsyncProps<T> extends AsyncOptions<T> {
2121
}
2222

2323
interface AbstractState<T> {
24-
initialValue?: T
24+
initialValue?: T | Error
2525
counter: number
2626
cancel: () => void
2727
run: (...args: any[]) => Promise<T>
@@ -31,6 +31,7 @@ interface AbstractState<T> {
3131
}
3232

3333
export type AsyncInitial<T> = AbstractState<T> & {
34+
initialValue?: undefined
3435
data: undefined
3536
error: undefined
3637
startedAt: undefined

0 commit comments

Comments
 (0)