import { Socket } from "net" ; import { TLSSocket } from "tls" ; export type CallbackFunction < T = any > = ( err ? : NodeJS . ErrnoException | null , result ? : T ) => void ; export type NetStream = Socket | TLSSocket ; export type CommandParameter = string | Buffer | number | any [ ] ; export interface ICommand { name : string ; args : CommandParameter [ ] ; resolve ( result ) : void ; reject ( error ) : void ; } export interface ICommandItem { command : ICommand ; stream : NetStream ; select : number ; }