import type { GTFSIOWriteOptions } from './types.d.ts'; import type { GTFSFileInfo } from '../../file-info.d.ts'; import type { GTFSAsyncFileRecords, GTFSFileRecords, GTFSFileRow } from '../../types.d.ts'; /** * File IO */ export declare class GTFSFileIO { protected constructor(); /** * Read chunks and returns records. * @param file File information * @param chunks Iterable file content chunks * @returns Iterable records */ static read(file: GTFSFileInfo, chunks: IterableIterator): IterableIterator; /** * Write records into line contents. * @param file File Information * @param records Iterable records * @param options write options * @returns Iterable file contents by line */ static write(file: GTFSFileInfo, records: GTFSFileRecords, options?: GTFSIOWriteOptions): IterableIterator; /** * Read file content into records array. * @param file File information * @param content File content * @param newLine Line separator (default: \n) * @returns Array of record */ static readContent(file: GTFSFileInfo, content: string): RowType[]; /** * Write records into file content. * @param file File information * @param records Row records * @param options Write options * @returns File content */ static writeContent(file: GTFSFileInfo, records: RowType[], options?: GTFSIOWriteOptions): string; } /** * File Async IO */ export declare class GTFSAsyncFileIO { protected constructor(); /** * Read chunks and returns records. * @param file File information * @param chunks Iterable file content chunks * @returns Iterable records */ static read(file: GTFSFileInfo, chunks: AsyncIterableIterator): AsyncIterableIterator; /** * Write records into line contents. * @param file File Information * @param records Iterable records * @param options write options * @returns Iterable file contents by line */ static write(file: GTFSFileInfo, records: GTFSAsyncFileRecords, options?: GTFSIOWriteOptions): AsyncIterableIterator; /** * Await for all chunks and return all the records. * @param file File information * @param chunks Chunks generator * @returns Promise of all records */ static readAll(file: GTFSFileInfo, chunks: AsyncIterableIterator): Promise; /** * Read file content and return all the records. * @param file File information * @param content File content * @returns Promise of all records */ static readAllContent(file: GTFSFileInfo, content: string): Promise; /** * Await for all records and return file content. * @param file File information * @param records Records generator * @param options Write options * @returns Promise of file content */ static writeAll(file: GTFSFileInfo, records: AsyncIterableIterator, options?: GTFSIOWriteOptions): Promise; /** * Write file content from given records. * @param file File information * @param records Records array * @param options Write options * @returns Promise of all records */ static writeAllRecords(file: GTFSFileInfo, records: RowType[], options?: GTFSIOWriteOptions): Promise; } //# sourceMappingURL=main.d.ts.map