From 632d2f70e99738d1fadf078564ca57305bd58393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduard=20Bardaj=C3=AD=20Puig?= Date: Fri, 1 Mar 2024 14:19:09 +0000 Subject: [PATCH] Set return and params to never for unknown methods --- src/request/types/index.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/request/types/index.ts b/src/request/types/index.ts index d2c4677..6e1b608 100644 --- a/src/request/types/index.ts +++ b/src/request/types/index.ts @@ -36,8 +36,8 @@ export type BtcRequestMethod = keyof BtcRequests; export type Requests = BtcRequests & StxRequests; -export type Return = Method extends keyof Requests ? Requests[Method]['result'] : unknown; -export type Params = Method extends keyof Requests ? Requests[Method]['params'] : unknown; +export type Return = Method extends keyof Requests ? Requests[Method]['result'] : never; +export type Params = Method extends keyof Requests ? Requests[Method]['params'] : never; export type Request = ( requestMethod: Method,