Skip to content

Commit 3c88ad9

Browse files
committed
Use union type with undefined instead of optional type.
1 parent e4a90a4 commit 3c88ad9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ export type AsyncWaiting<T> = AbstractState<T> & {
4545
isSettled: false
4646
}
4747
export type AsyncPending<T> = AbstractState<T> & {
48-
data?: T
49-
error?: Error
48+
data: T | undefined
49+
error: Error | undefined
5050
startedAt: Date
5151
finishedAt: undefined
5252
status: "pending"
@@ -73,7 +73,7 @@ export type AsyncFulfilled<T> = AbstractState<T> & {
7373
isSettled: true
7474
}
7575
export type AsyncRejected<T> = AbstractState<T> & {
76-
data?: T
76+
data: T | undefined
7777
error: Error
7878
startedAt: Date
7979
finishedAt: Date

0 commit comments

Comments
 (0)