Skip to content

Commit 313cadd

Browse files
authored
Merge pull request #244 from Kiikurage/improve-type
TypeScript: Improve type definition to use optional chaining
2 parents b60163c + 959a03a commit 313cadd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/index.d.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,19 +47,23 @@ export interface PendingPromiseState<T = {}> extends PromiseStateBase {
4747
readonly pending: true;
4848
readonly fulfilled: false;
4949
readonly rejected: false;
50+
readonly value: undefined;
51+
readonly reason: undefined;
5052
}
5153

5254
export interface FulfilledPromiseState<T = {}> extends PromiseStateBase {
5355
readonly pending: false;
5456
readonly fulfilled: true;
5557
readonly rejected: false;
5658
readonly value: T;
59+
readonly reason: undefined;
5760
}
5861

5962
export interface RejectedPromiseState<T = {}> extends PromiseStateBase {
6063
readonly pending: false;
6164
readonly fulfilled: false;
6265
readonly rejected: true;
66+
readonly value: undefined;
6367
readonly reason: any;
6468
}
6569

0 commit comments

Comments
 (0)