Bump deps

This commit is contained in:
Aleksandr Kraiz
2023-03-08 21:55:28 +04:00
parent b21eaaf163
commit 0350720f77
5 changed files with 412 additions and 8480 deletions

View File

@@ -11,7 +11,7 @@ import {
import UnsubscriptionType from './UnsubscriptionType';
import type {
SwapInfoBase, AssetPairUpdate, OrderbookItem,
Balance, Exchange, CFDBalance, FuturesTradeInfo, SwapInfo, AnyJSON,
Balance, Exchange, CFDBalance, FuturesTradeInfo, SwapInfo, Json,
} from '../../../types';
import unsubscriptionDoneSchema from './schemas/unsubscriptionDoneSchema';
import assetPairConfigSchema from './schemas/assetPairConfigSchema';
@@ -202,7 +202,7 @@ class OrionAggregatorWS {
}
}
private send(jsonObject: AnyJSON) {
private send(jsonObject: Json) {
if (this.ws?.readyState === WebSocket.OPEN) {
const jsonData = JSON.stringify(jsonObject);
this.ws.send(jsonData);
@@ -228,7 +228,7 @@ class OrionAggregatorWS {
const id = type === 'aobus'
? ((subscription as any).payload as string) // TODO: Refactor!!!
: uuidv4();
const subRequest: AnyJSON = {};
const subRequest: Json = {};
subRequest['T'] = type;
subRequest['id'] = id;

View File

@@ -4,7 +4,7 @@ import { v4 as uuidv4 } from 'uuid';
import priceFeedSubscriptions from './priceFeedSubscriptions';
import { tickerInfoSchema, candleSchema } from './schemas';
import priceSchema from './schemas/priceSchema';
import type { AnyJSON } from '../../../types';
import type { Json } from '../../../types';
import allTickersSchema from './schemas/allTickersSchema';
export const subscriptions = {
@@ -83,7 +83,7 @@ export default class PriceFeedSubscription<T extends SubscriptionType = Subscrip
this.init();
}
private send(jsonObject: AnyJSON) {
private send(jsonObject: Json) {
if (this.ws?.readyState === WebSocket.OPEN) {
const jsonData = JSON.stringify(jsonObject);
this.ws.send(jsonData);

View File

@@ -294,11 +294,4 @@ export type VerboseOrionUnitConfig = {
export type KnownEnv = typeof knownEnvs[number];
export type AnyJSON = string | number | boolean | null | JSONObject | JSONArray;
// eslint-disable-next-line @typescript-eslint/consistent-indexed-object-style
interface JSONObject {
[x: string]: AnyJSON
}
interface JSONArray extends Array<AnyJSON> {}
export type Json = string | number | boolean | null | Json[] | { [key: string]: Json };