From dcd60228ed753a146bcb56bb5bf51166835acfb7 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Sun, 19 Jan 2020 00:38:45 -0500 Subject: Strongly typing WebsocketJsonResponse. Forgot comment-form.tsx --- ui/src/components/inbox.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'ui/src/components/inbox.tsx') diff --git a/ui/src/components/inbox.tsx b/ui/src/components/inbox.tsx index a46017e2..4aa9cebe 100644 --- a/ui/src/components/inbox.tsx +++ b/ui/src/components/inbox.tsx @@ -12,6 +12,7 @@ import { GetUserMentionsResponse, UserMentionResponse, CommentResponse, + WebSocketJsonResponse, } from '../interfaces'; import { WebSocketService, UserService } from '../services'; import { wsJsonToRes, fetchLimit } from '../utils'; @@ -296,7 +297,7 @@ export class Inbox extends Component { WebSocketService.Instance.markAllAsRead(); } - parseMessage(msg: any) { + parseMessage(msg: WebSocketJsonResponse) { console.log(msg); let res = wsJsonToRes(msg); if (res.error) { -- cgit v1.2.3