Skip to content

Commit

Permalink
fix: add reason in valid fragment type
Browse files Browse the repository at this point in the history
  • Loading branch information
Nebulis committed Apr 29, 2021
1 parent adc74e0 commit 167f800
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/types/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ export interface VerificationFragment {
export interface ValidVerificationFragment<Data> extends VerificationFragment {
status: "VALID";
data: Data;
// this is useless, it's just to make it easier to work with fragment, otherwise reason is not available and a consumer needs to narrow the type down first
reason?: never;
}
export interface InvalidVerificationFragment<Data> extends VerificationFragment {
status: "INVALID";
Expand Down

0 comments on commit 167f800

Please sign in to comment.