Platform-specific functions used by TlBinaryReader and TlBinaryWriter

interface ICorePlatform {
    base64Decode: ((str: string, url?: boolean) => Uint8Array);
    base64Encode: ((buf: Uint8Array, url?: boolean) => string);
    beforeExit: ((fn: (() => void)) => (() => void));
    getDefaultLogLevel: (() => null | number);
    getDeviceModel: (() => string);
    hexDecode: ((str: string) => Uint8Array);
    hexEncode: ((buf: Uint8Array) => string);
    isOnline?: (() => boolean);
    log: ((color: number, level: number, tag: string, fmt: string, args: unknown[]) => void);
    normalizeFile?: ((file: UploadFileLike) => MaybePromise<null | {
        file?: UploadFileLike;
        fileName?: string;
        fileSize?: number;
    }>);
    onNetworkChanged?: ((fn: ((connected: boolean) => void)) => (() => void));
    utf8ByteLength: ((str: string) => number);
    utf8Decode: ((buf: Uint8Array) => string);
    utf8Encode: ((str: string) => Uint8Array);
}

Hierarchy (view full)

Implemented by

    Properties

    base64Decode: ((str: string, url?: boolean) => Uint8Array)
    base64Encode: ((buf: Uint8Array, url?: boolean) => string)
    beforeExit: ((fn: (() => void)) => (() => void))
    getDefaultLogLevel: (() => null | number)
    getDeviceModel: (() => string)
    hexDecode: ((str: string) => Uint8Array)
    hexEncode: ((buf: Uint8Array) => string)
    isOnline?: (() => boolean)
    log: ((color: number, level: number, tag: string, fmt: string, args: unknown[]) => void)
    normalizeFile?: ((file: UploadFileLike) => MaybePromise<null | {
        file?: UploadFileLike;
        fileName?: string;
        fileSize?: number;
    }>)
    onNetworkChanged?: ((fn: ((connected: boolean) => void)) => (() => void))
    utf8ByteLength: ((str: string) => number)
    utf8Decode: ((buf: Uint8Array) => string)
    utf8Encode: ((str: string) => Uint8Array)