make slim pack
This commit is contained in:
@@ -6,8 +6,11 @@
|
||||
const API_BASE = ''; // 相对路径
|
||||
|
||||
export class ApiError extends Error {
|
||||
constructor(public status: number, message: string) {
|
||||
public status: number;
|
||||
|
||||
constructor(status: number, message: string) {
|
||||
super(message);
|
||||
this.status = status;
|
||||
this.name = 'ApiError';
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,8 +19,11 @@ export class GameSocket {
|
||||
private reconnectTimer: number | null = null;
|
||||
private attempts = 0;
|
||||
private isIntentionalClose = false;
|
||||
private options: SocketOptions;
|
||||
|
||||
constructor(private options: SocketOptions = {}) {}
|
||||
constructor(options: SocketOptions = {}) {
|
||||
this.options = options;
|
||||
}
|
||||
|
||||
public connect() {
|
||||
this.isIntentionalClose = false;
|
||||
|
||||
Reference in New Issue
Block a user