chore(): tidying, consolidate repetitive types

This commit is contained in:
tiagosiebler
2023-02-15 11:33:22 +00:00
parent 145f17d4f1
commit 47e1255159
8 changed files with 179 additions and 109 deletions

View File

@@ -6,3 +6,34 @@ export type OrderTimeInForceV5 = 'GTC' | 'IOC' | 'FOK' | 'PostOnly';
export type OrderTriggerByV5 = 'LastPrice' | 'IndexPrice' | 'MarkPrice';
export type OrderTypeV5 = 'Market' | 'Limit';
export type PositionIdx = 0 | 1 | 2;
export interface CategoryCursorListV5<T extends unknown[]> {
category: CategoryV5;
list: T;
nextPageCursor?: string;
}
/**
* Next page cursor does not exist for spot!
*/
export interface CursorListV5<T extends unknown[]> {
nextPageCursor: string;
list: T;
}
export interface CategoryListV5<
T extends unknown[],
TCategory extends CategoryV5
> {
category: TCategory;
list: T;
}
export interface CategorySymbolListV5<
T extends unknown[],
TCategory extends CategoryV5
> {
category: TCategory;
symbol: string;
list: T;
}