Adding option types 2 (#689)

* Not working, because of wrong API types.

* Adding Rust-style Result and Option types.

- Fixes #646

* Updating to use new lemmy-js-client with Options.
This commit is contained in:
Dessalines 2022-06-21 17:42:29 -04:00 committed by GitHub
parent d41e19f3f1
commit d905c91e1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
60 changed files with 5883 additions and 4485 deletions

View file

@ -1,4 +1,3 @@
import { PersonViewSafe, WebSocketJsonResponse } from "lemmy-js-client";
import { Observable } from "rxjs";
import { share } from "rxjs/operators";
import {
@ -15,9 +14,6 @@ export class WebSocketService {
private ws: WS;
public subject: Observable<any>;
public admins: PersonViewSafe[];
public banned: PersonViewSafe[];
private constructor() {
let firstConnect = true;
@ -34,7 +30,7 @@ export class WebSocketService {
console.log(`Connected to ${wsUri}`);
if (!firstConnect) {
let res: WebSocketJsonResponse<any> = {
let res = {
reconnect: true,
};
obs.next(res);