export = StreamClient;
/**
* Connect to the Twitter API v2 sampled stream endpoint and emit events for processing
* For additional information see
* [Twitter Sampled Stream]{@link https://developer.twitter.com/en/docs/twitter-api/tweets/sampled-stream/introduction}
* @extends EventEmitter
* @fires StreamClient#tweet
* @fires StreamClient#connected
* @fires StreamClient#reconnect
* @fires StreamClient#disconnected
* @fires StreamClient#close
* @fires StreamClient#stream-error
* @fires StreamClient#api-errors
* @fires StreamClient#heartbeat
* @fires StreamClient#other
*/
declare class StreamClient {
/**
* Initializes the client
* @param {Object} config Configuration for client
* @param {number} config.timeout Set request and response timeout
* @param {string} config.token Set [OAUTH Bearer token]{@link https://developer.twitter.com/en/docs/authentication/oauth-2-0} from developer account
*/
constructor({ token, timeout, stream_timeout }: {
timeout: number;
token: string;
});
timeout: number;
twitrClient: any;
stream_timeout: any;
/**
* Connect to twitter stream and emit events.
* @param {Object} config Configuration for connection
* @param {number} config.params Set any filter parameters for stream, etc.
* @param {string} config.max_reconnects Specify max number of reconnects. Default: -1 (infinity)
* @returns {(Promise