fix lint errors
This commit is contained in:
parent
bdf013d547
commit
5ac094e51b
|
@ -1,4 +1,4 @@
|
||||||
import { Endpoints } from './api.types';
|
import type { Endpoints } from './api.types';
|
||||||
|
|
||||||
const MK_API_ERROR = Symbol();
|
const MK_API_ERROR = Symbol();
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ export class APIClient {
|
||||||
cache: 'no-cache',
|
cache: 'no-cache',
|
||||||
}).then(async (res) => {
|
}).then(async (res) => {
|
||||||
const body = res.status === 204 ? null : await res.json();
|
const body = res.status === 204 ? null : await res.json();
|
||||||
|
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
resolve(body);
|
resolve(body);
|
||||||
} else if (res.status === 204) {
|
} else if (res.status === 204) {
|
||||||
|
@ -96,7 +96,7 @@ export class APIClient {
|
||||||
}
|
}
|
||||||
}).catch(reject);
|
}).catch(reject);
|
||||||
});
|
});
|
||||||
|
|
||||||
return promise as any;
|
return promise as any;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import {
|
import type {
|
||||||
Ad, Announcement, Antenna, App, AuthSession, Blocking, Channel, Clip, DateString, DetailedInstanceMetadata, DriveFile, DriveFolder, Following, FollowingFolloweePopulated, FollowingFollowerPopulated, FollowRequest, GalleryPost, Instance, InstanceMetadata,
|
Ad, Announcement, Antenna, App, AuthSession, Blocking, Channel, Clip, DateString, DetailedInstanceMetadata, DriveFile, DriveFolder, Following, FollowingFolloweePopulated, FollowingFollowerPopulated, FollowRequest, GalleryPost, Instance,
|
||||||
LiteInstanceMetadata,
|
LiteInstanceMetadata,
|
||||||
MeDetailed,
|
MeDetailed,
|
||||||
Note, NoteFavorite, OriginType, Page, ServerInfo, Stats, User, UserDetailed, UserGroup, UserList, UserSorting, Notification, NoteReaction, Signin, MessagingMessage,
|
Note, NoteFavorite, OriginType, Page, ServerInfo, Stats, User, UserDetailed, UserGroup, UserList, UserSorting, Notification, NoteReaction, Signin, MessagingMessage,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import autobind from 'autobind-decorator';
|
import autobind from 'autobind-decorator';
|
||||||
import { EventEmitter } from 'eventemitter3';
|
import { EventEmitter } from 'eventemitter3';
|
||||||
import ReconnectingWebsocket from 'reconnecting-websocket';
|
import ReconnectingWebsocket from 'reconnecting-websocket';
|
||||||
import { BroadcastEvents, Channels } from './streaming.types';
|
import type { BroadcastEvents, Channels } from './streaming.types';
|
||||||
|
|
||||||
export function urlQuery(obj: Record<string, string | number | boolean | undefined>): string {
|
export function urlQuery(obj: Record<string, string | number | boolean | undefined>): string {
|
||||||
const params = Object.entries(obj)
|
const params = Object.entries(obj)
|
||||||
|
@ -40,7 +40,7 @@ export default class Stream extends EventEmitter<StreamEvents> {
|
||||||
|
|
||||||
const query = urlQuery({
|
const query = urlQuery({
|
||||||
i: user?.token,
|
i: user?.token,
|
||||||
|
|
||||||
// To prevent cache of an HTML such as error screen
|
// To prevent cache of an HTML such as error screen
|
||||||
_t: Date.now(),
|
_t: Date.now(),
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { Antenna, CustomEmoji, DriveFile, MeDetailed, MessagingMessage, Note, Notification, PageEvent, User, UserGroup } from './entities';
|
import type { Antenna, CustomEmoji, DriveFile, MeDetailed, MessagingMessage, Note, Notification, PageEvent, User, UserGroup } from './entities';
|
||||||
|
|
||||||
type FIXME = any;
|
type FIXME = any;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue