Skip to content

Commit ea213f3

Browse files
authored
chore: Modify Logger type definition (#515)
### Description Of Changes * Modify the methods of Logger: from optional to demand
1 parent efadb30 commit ea213f3

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

scripts/index_d_ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,9 @@ declare module "SendbirdUIKitGlobal" {
8787
}
8888

8989
export type Logger = {
90-
info?(title?: unknown, description?: unknown): void;
91-
error?(title?: unknown, description?: unknown): void;
92-
warning?(title?: unknown, description?: unknown): void;
90+
info(message: string, payload?: Record<string, unknown>): void;
91+
error(message: string, payload?: Record<string, unknown>): void;
92+
warning(message: string, payload?: Record<string, unknown>): void;
9393
}
9494

9595
export type MarkAsReadSchedulerType = {

src/lib/SendbirdState.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ interface RenderUserProfileProps {
1818
}
1919

2020
export type Logger = {
21-
info?(title?: unknown, description?: unknown): void;
22-
error?(title?: unknown, description?: unknown): void;
23-
warning?(title?: unknown, description?: unknown): void;
24-
};
21+
info(message: string, payload?: Record<string, unknown>): void;
22+
error(message: string, payload?: Record<string, unknown>): void;
23+
warning(message: string, payload?: Record<string, unknown>): void;
24+
}
2525

2626
export enum SendbirdUIKitThemes {
2727
light = 'light',

0 commit comments

Comments
 (0)