/// <reference types="node" />
import { Transform } from 'stream';
declare class GTFTransform extends Transform {
    constructor(inputOptions?: {});
    _addLine(data: any): void;
    _nextText(buffer: any): void;
    _transform(chunk: any, encoding: any, callback: any): void;
    _flush(callback: any): void;
}
/**
 * Parse a stream of text data into a stream of feature,
 * directive, and comment objects.
 *
 * @param {Object} options optional options object
 * @param {string} options.encoding text encoding of the input GTF. default 'utf8'
 * @param {boolean} options.parseAll default false.  if true, will parse all items. overrides other flags
 * @param {boolean} options.parseFeatures default true
 * @param {boolean} options.parseDirectives default false
 * @param {boolean} options.parseComments default false
 * @param {boolean} options.parseSequences default true
 * @param {Number} options.bufferSize maximum number of GTF lines to buffer. defaults to 1000
 * @returns {ReadableStream} stream (in objectMode) of parsed items
 */
export declare function parseStream(options?: {}): GTFTransform;
/**
 * Read and parse a GTF file from the filesystem.
 *
 * @param {string} filename the filename of the file to parse
 * @param {Object} options optional options object
 * @param {string} options.encoding the file's string encoding, defaults to 'utf8'
 * @param {boolean} options.parseAll default false.  if true, will parse all items. overrides other flags
 * @param {boolean} options.parseFeatures default true
 * @param {boolean} options.parseDirectives default false
 * @param {boolean} options.parseComments default false
 * @param {boolean} options.parseSequences default true
 * @param {Number} options.bufferSize maximum number of GTF lines to buffer. defaults to 1000
 * @returns {ReadableStream} stream (in objectMode) of parsed items
 */
export declare function parseFile(filename: any, options: any): any;
/**
 * Synchronously parse a string containing GTF and return
 * an arrayref of the parsed items.
 *
 * @param {string} str
 * @param {Object} inputOptions optional options object
 * @param {boolean} inputOptions.parseAll default false.  if true, will parse all items. overrides other flags
 * @param {boolean} inputOptions.parseFeatures default true
 * @param {boolean} inputOptions.parseDirectives default false
 * @param {boolean} inputOptions.parseComments default false
 * @param {boolean} inputOptions.parseSequences default true
 * @returns {Array} array of parsed features, directives, and/or comments
 */
export declare function parseStringSync(str: any, inputOptions?: {}): any[];
/**
 * Format an array of GTF items (features,directives,comments) into string of GTF.
 * Does not insert synchronization (###) marks.
 * Does not insert directive if it's not already there.
 *
 * @param {Array[Object]} items
 * @returns {String} the formatted GTF
 */
export declare function formatSync(items: any): string;
declare class FormattingTransform extends Transform {
    constructor(options?: {});
    _transform(chunk: any, encoding: any, callback: any): void;
}
/**
 * Format a stream of items (of the type produced
 * by this script) into a stream of GTF text.
 *
 * Inserts synchronization (###) marks automatically.
 *
 * @param {Object} options
 * @param {Object} options.minSyncLines minimum number of lines between ### marks. default 100
 * @param {Boolean} options.insertVersionDirective
 *  if the first item in the stream is not a ##gff-version directive, insert one to show it's gtf
 *  default false
 */
export declare function formatStream(options: any): FormattingTransform;
/**
 * Format a stream of items (of the type produced
 * by this script) into a GTF file and write it to the filesystem.

 * Inserts synchronization (###) marks and a ##gtf
 * directive automatically (if one is not already present).
 *
 * @param {ReadableStream} stream the stream to write to the file
 * @param {String} filename the file path to write to
 * @param {Object} options
 * @param {String} options.encoding default 'utf8'. encoding for the written file
 * @param {Number} options.minSyncLines
 *  minimum number of lines between sync (###) marks. default 100
 * @param {Boolean} options.insertVersionDirective
 *  if the first item in the stream is not a ##gtf directive, insert one.
 *  default false
 * @returns {Promise} promise for the written filename
 */
export declare function formatFile(stream: any, filename: any, options?: {}): Promise<unknown>;
export {};
