UNPKG

@tgsnake/core

Version:

Pure Telegram MTProto library for nodejs

21 lines (20 loc) 788 B
import { Duplex, Buffer, type BufferEncoding } from '../platform.node.js'; import { BytesIO } from '../raw/index.js'; export type TypeFileChunk = Buffer | ArrayBufferView | DataView | string | null | any; export type TypeFileCallback = (error?: any) => void; export declare class File extends Duplex { protected _bytes: BytesIO; constructor(); _write(chunk: TypeFileChunk, encoding: BufferEncoding, next: TypeFileCallback): void; _read(length?: number): Buffer | null; push(chunk: TypeFileChunk, encoding?: BufferEncoding): boolean; on(event: string, callback: TypeFileCallback): this; pipe(destination: any, options?: { end?: boolean; }): any; get bytes(): BytesIO; toJSON(): { [key: string]: any; }; toString(): string; }