ccxt
Version:
44 lines (43 loc) • 4.51 kB
TypeScript
import { implicitReturnType, Int, Str, NullableIndexType, Num } from '../types.js';
declare const isNumber: (number: unknown) => boolean;
declare const isInteger: (number: unknown) => boolean;
declare const isArray: (arg: any) => arg is any[];
declare const hasProps: (o: any) => boolean;
declare const isString: (s: any) => s is string;
declare const isObject: (o: any) => boolean;
declare const isDictionary: (o: any) => boolean;
declare const isStringCoercible: (x: any) => any;
declare const prop: (o: any, k: NullableIndexType) => any;
declare const asFloat: (x: any) => number | typeof NaN;
declare const asInteger: (x: any) => number | typeof NaN;
declare function safeFloat(o: implicitReturnType, k: NullableIndexType, $default?: number): Num;
declare function safeInteger(o: implicitReturnType, k: NullableIndexType, $default: number): number;
declare function safeInteger(o: implicitReturnType, k: NullableIndexType, $default?: number): Int;
declare function safeIntegerProduct(o: implicitReturnType, k: NullableIndexType, $factor: number, $default?: number): Int;
declare function safeTimestamp(o: implicitReturnType, k: NullableIndexType, $default?: number): Int;
declare function safeValue(o: implicitReturnType, k: NullableIndexType, $default?: any): any;
declare function safeString(o: implicitReturnType, k: NullableIndexType, $default: string): string;
declare function safeString(o: implicitReturnType, k: NullableIndexType, $default?: string): Str;
declare function safeStringLower(o: implicitReturnType, k: NullableIndexType, $default?: string): Str;
declare function safeStringUpper(o: implicitReturnType, k: NullableIndexType, $default?: string): Str;
declare function safeFloat2(o: implicitReturnType, k1: NullableIndexType, k2: NullableIndexType, $default?: number): Num;
declare function safeInteger2(o: implicitReturnType, k1: NullableIndexType, k2: NullableIndexType, $default: number): number;
declare function safeInteger2(o: implicitReturnType, k1: NullableIndexType, k2: NullableIndexType, $default?: number): Int;
declare function safeIntegerProduct2(o: implicitReturnType, k1: NullableIndexType, k2: NullableIndexType, $factor: number, $default?: number): Int;
declare function safeTimestamp2(o: implicitReturnType, k1: NullableIndexType, k2: NullableIndexType, $default?: Int): Int;
declare function safeValue2(o: implicitReturnType, k1: NullableIndexType, k2: NullableIndexType, $default?: any): any;
declare function safeString2(o: implicitReturnType, k1: NullableIndexType, k2: NullableIndexType, $default: string): string;
declare function safeString2(o: implicitReturnType, k1: NullableIndexType, k2: NullableIndexType, $default?: string): Str;
declare function safeStringLower2(o: implicitReturnType, k1: NullableIndexType, k2: NullableIndexType, $default?: string): Str;
declare function safeStringUpper2(o: implicitReturnType, k1: NullableIndexType, k2: NullableIndexType, $default?: string): Str;
declare function safeFloatN(o: implicitReturnType, k: (NullableIndexType)[], $default?: number): Num;
declare function safeIntegerN(o: implicitReturnType, k: (NullableIndexType)[], $default: number): number;
declare function safeIntegerN(o: implicitReturnType, k: (NullableIndexType)[], $default?: number): Int;
declare function safeIntegerProductN(o: implicitReturnType, k: (NullableIndexType)[], $factor: number, $default?: number): Int;
declare function safeTimestampN(o: implicitReturnType, k: (NullableIndexType)[], $default?: number): Int;
declare function safeValueN(o: implicitReturnType, k: (NullableIndexType)[], $default?: any): any;
declare function safeStringN(o: implicitReturnType, k: (NullableIndexType)[], $default: string): string;
declare function safeStringN(o: implicitReturnType, k: (NullableIndexType)[], $default?: string): Str;
declare function safeStringLowerN(o: implicitReturnType, k: (NullableIndexType)[], $default?: string): Str;
declare function safeStringUpperN(o: implicitReturnType, k: (NullableIndexType)[], $default?: string): Str;
export { isNumber, isInteger, isArray, isObject, isString, isStringCoercible, isDictionary as isDict, hasProps, prop, asFloat, asInteger, safeFloat, safeInteger, safeIntegerProduct, safeTimestamp, safeValue, safeString, safeStringLower, safeStringUpper, safeFloat2, safeInteger2, safeIntegerProduct2, safeTimestamp2, safeValue2, safeString2, safeStringLower2, safeStringUpper2, safeFloatN, safeIntegerN, safeIntegerProductN, safeTimestampN, safeValueN, safeStringN, safeStringLowerN, safeStringUpperN, };