From 1e5873698c876cbee5a8266c45aa5c3d306836b7 Mon Sep 17 00:00:00 2001 From: Roland Bewick Date: Fri, 17 Nov 2023 13:18:20 +0700 Subject: [PATCH] fix: make preimage optional --- src/types.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/types.ts b/src/types.ts index edc2fe4..f7a4fcc 100644 --- a/src/types.ts +++ b/src/types.ts @@ -63,11 +63,11 @@ export abstract class AuthClient { } // https://stackoverflow.com/a/50375286 -export type UnionToIntersection = ( - U extends any ? (k: U) => void : never -) extends (k: infer I) => void - ? I - : never; +export type UnionToIntersection = + // eslint-disable-next-line @typescript-eslint/no-explicit-any + (U extends any ? (k: U) => void : never) extends (k: infer I) => void + ? I + : never; export type GetSuccess = { [K in SuccessStatus & keyof T]: GetContent; @@ -85,7 +85,7 @@ export type ExtractAlbyResponse = "responses" extends keyof T ? GetSuccess : never; -export type GetInvoicesRequestParams = { +export type GetInvoicesRequestParams = { q?: { since?: string; created_at_lt?: string; @@ -206,7 +206,7 @@ export type Invoice = { payer_pubkey?: string; payment_hash: string; payment_request: string; - preimage: string; + preimage?: string; r_hash_str: string; settled: boolean; settled_at: string;