Skip to content

Commit

Permalink
Set return and params to never for unknown methods
Browse files Browse the repository at this point in the history
  • Loading branch information
aryzing committed Mar 1, 2024
1 parent bd411f8 commit 632d2f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/request/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export type BtcRequestMethod = keyof BtcRequests;

export type Requests = BtcRequests & StxRequests;

export type Return<Method> = Method extends keyof Requests ? Requests[Method]['result'] : unknown;
export type Params<Method> = Method extends keyof Requests ? Requests[Method]['params'] : unknown;
export type Return<Method> = Method extends keyof Requests ? Requests[Method]['result'] : never;
export type Params<Method> = Method extends keyof Requests ? Requests[Method]['params'] : never;

export type Request<Method extends keyof Requests> = (
requestMethod: Method,
Expand Down

0 comments on commit 632d2f7

Please sign in to comment.