Skip to content

Commit

Permalink
Update EverythingButNull to use less brittle type definition
Browse files Browse the repository at this point in the history
- For proof of correctness see https://tsplay.dev/mpQX7W.
- TODO: move `EverythingButNull` into `misc.ts` and export.
  • Loading branch information
MajorLift authored Oct 11, 2023
1 parent bbffb39 commit 7b176aa
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/json-rpc-provider-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,4 @@ type SendAsyncCallback<Result extends Json> = (

// What it says on the tin. We omit `null`, as that value is used for a
// successful response to indicate a lack of an error.
type EverythingButNull =
| string
| number
| boolean
| object
| symbol
| undefined;
type EverythingButNull = NonNullable<unknown> | undefined;

0 comments on commit 7b176aa

Please sign in to comment.