feat: 🎸 Made User properties optional for hook convenience (#31)

This commit is contained in:
Johan Öbrink 2021-01-04 19:02:48 +01:00 committed by GitHub
parent d7e4981822
commit 0e0e996589
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 9 deletions

View File

@ -10,7 +10,7 @@ export interface CallInfo extends RequestInit {
}
export interface FetcherOptions {
record?: (info: CallInfo, data: string | Blob | Buffer | ArrayBuffer) => Promise<void>
record?: (info: CallInfo, data: string | Blob | ArrayBuffer | any) => Promise<void>
}
export interface Fetcher {
@ -18,7 +18,7 @@ export interface Fetcher {
}
export interface Recorder {
(info: CallInfo, data: string | Blob | Buffer | ArrayBuffer): Promise<void>
(info: CallInfo, data: string | Blob | ArrayBuffer | any): Promise<void>
}
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<void> => {
if (!options.record) {
return

View File

@ -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
}