From 0e0e9965892e69819e9b49dfcdf2afdddacccb47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20=C3=96brink?= Date: Mon, 4 Jan 2021 19:02:48 +0100 Subject: [PATCH] =?UTF-8?q?feat:=20=F0=9F=8E=B8=20Made=20User=20properties?= =?UTF-8?q?=20optional=20for=20hook=20convenience=20(#31)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/fetcher.ts | 6 +++--- lib/types.ts | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/fetcher.ts b/lib/fetcher.ts index c2239fce..dcb3a300 100644 --- a/lib/fetcher.ts +++ b/lib/fetcher.ts @@ -10,7 +10,7 @@ export interface CallInfo extends RequestInit { } export interface FetcherOptions { - record?: (info: CallInfo, data: string | Blob | Buffer | ArrayBuffer) => Promise + record?: (info: CallInfo, data: string | Blob | ArrayBuffer | any) => Promise } export interface Fetcher { @@ -18,7 +18,7 @@ export interface Fetcher { } export interface Recorder { - (info: CallInfo, data: string | Blob | Buffer | ArrayBuffer): Promise + (info: CallInfo, data: string | Blob | ArrayBuffer | any): Promise } const record = async ( @@ -28,7 +28,7 @@ const record = async ( type: string, options: FetcherOptions, response: Response, - data: string | Buffer | ArrayBuffer | Blob, + data: string | ArrayBuffer | Blob | any, ): Promise => { if (!options.record) { return diff --git a/lib/types.ts b/lib/types.ts index fb91ccce..4b3b2daf 100644 --- a/lib/types.ts +++ b/lib/types.ts @@ -146,10 +146,10 @@ export interface MenuItem { } export interface User { - personalNumber: string - isAuthenticated: boolean - firstName: string - lastName: string - email: string | null - notificationId: string + personalNumber?: string + isAuthenticated?: boolean + firstName?: string + lastName?: string + email?: string | null + notificationId?: string }