diff options
author | Dessalines <tyhou13@gmx.com> | 2020-01-19 00:38:45 -0500 |
---|---|---|
committer | Dessalines <tyhou13@gmx.com> | 2020-01-19 00:38:45 -0500 |
commit | dcd60228ed753a146bcb56bb5bf51166835acfb7 (patch) | |
tree | f21c87ff98fd81af2d843fe1fe30c45b9e708af4 /ui/src/components/setup.tsx | |
parent | a044718066623f19d51196d444bd199c1231cebe (diff) |
Strongly typing WebsocketJsonResponse. Forgot comment-form.tsx
Diffstat (limited to 'ui/src/components/setup.tsx')
-rw-r--r-- | ui/src/components/setup.tsx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/ui/src/components/setup.tsx b/ui/src/components/setup.tsx index 5b081111..c4c9dc63 100644 --- a/ui/src/components/setup.tsx +++ b/ui/src/components/setup.tsx @@ -1,7 +1,12 @@ import { Component, linkEvent } from 'inferno'; import { Subscription } from 'rxjs'; import { retryWhen, delay, take } from 'rxjs/operators'; -import { RegisterForm, LoginResponse, UserOperation } from '../interfaces'; +import { + RegisterForm, + LoginResponse, + UserOperation, + WebSocketJsonResponse, +} from '../interfaces'; import { WebSocketService, UserService } from '../services'; import { wsJsonToRes } from '../utils'; import { SiteForm } from './site-form'; @@ -181,7 +186,7 @@ export class Setup extends Component<any, State> { i.setState(i.state); } - parseMessage(msg: any) { + parseMessage(msg: WebSocketJsonResponse) { let res = wsJsonToRes(msg); if (res.error) { alert(i18n.t(res.error)); |