import tcpp from "tcp-ping" ; import type { Options , Result } from "tcp-ping" ; param options export const ping = ( options ) => new Promise < Result > ( ( resolve , reject ) => { tcpp . ping ( options , ( error , data ) => { if ( error ) return reject ( error ) ; resolve ( data ) ; } ) ; } ) ;