* When an asynchronous operation is initiated or completes a callback is called to notify the user.
* The before callback is called just before said callback is executed.
* @param asyncId the unique identifier assigned to the resource about to execute the callback.
*/
before?(asyncId:number):void;
/**
* Called immediately after the callback specified in before is completed.
* @param asyncId the unique identifier assigned to the resource which has executed the callback.
*/
after?(asyncId:number):void;
/**
* Called when a promise has resolve() called. This may not be in the same execution id
* as the promise itself.
* @param asyncId the unique id for the promise that was resolve()d.
*/
promiseResolve?(asyncId:number):void;
/**
* Called after the resource corresponding to asyncId is destroyed
* @param asyncId a unique ID for the async resource
*/
destroy?(asyncId:number):void;
}
interfaceAsyncHook{
/**
* Enable the callbacks for a given AsyncHook instance. If no callbacks are provided enabling is a noop.
*/
enable():this;
/**
* Disable the callbacks for a given AsyncHook instance from the global pool of AsyncHook callbacks to be executed. Once a hook has been disabled it will not be called again until enabled.
*/
disable():this;
}
/**
* Registers functions to be called for different lifetime events of each async operation.
* @param options the callbacks to register
* @return an AsyncHooks instance used for disabling and enabling hooks
addListener(event:"message",listener:(message:any,handle:net.Socket|net.Server)=>void):this;// the handle is a net.Socket or net.Server object, or undefined.
prependListener(event:"message",listener:(message:any,handle:net.Socket|net.Server)=>void):this;// the handle is a net.Socket or net.Server object, or undefined.
prependOnceListener(event:"message",listener:(message:any,handle:net.Socket|net.Server)=>void):this;// the handle is a net.Socket or net.Server object, or undefined.
addListener(event:"message",listener:(worker:Worker,message:any,handle:net.Socket|net.Server)=>void):this;// the handle is a net.Socket or net.Server object, or undefined.
on(event:"message",listener:(worker:Worker,message:any,handle:net.Socket|net.Server)=>void):this;// the handle is a net.Socket or net.Server object, or undefined.
once(event:"message",listener:(worker:Worker,message:any,handle:net.Socket|net.Server)=>void):this;// the handle is a net.Socket or net.Server object, or undefined.
prependListener(event:"message",listener:(worker:Worker,message:any,handle:net.Socket|net.Server)=>void):this;// the handle is a net.Socket or net.Server object, or undefined.
functionon(event:"message",listener:(worker:Worker,message:any,handle:net.Socket|net.Server)=>void):Cluster;// the handle is a net.Socket or net.Server object, or undefined.
functiononce(event:"message",listener:(worker:Worker,message:any,handle:net.Socket|net.Server)=>void):Cluster;// the handle is a net.Socket or net.Server object, or undefined.
* When `stdout` is a TTY, calling `console.clear()` will attempt to clear the TTY.
* When `stdout` is not a TTY, this method does nothing.
*/
clear():void;
/**
* Maintains an internal counter specific to `label` and outputs to `stdout` the number of times `console.count()` has been called with the given `label`.
*/
count(label?:string):void;
/**
* Resets the internal counter specific to `label`.
*/
countReset(label?:string):void;
/**
* The `console.debug()` function is an alias for {@link console.log}.
*/
debug(message?:any,...optionalParams:any[]):void;
/**
* Uses {@link util.inspect} on `obj` and prints the resulting string to `stdout`.
* This function bypasses any custom `inspect()` function defined on `obj`.
*/
dir(obj:any,options?:InspectOptions):void;
/**
* This method calls {@link console.log} passing it the arguments received. Please note that this method does not produce any XML formatting
*/
dirxml(...data:any[]):void;
/**
* Prints to `stderr` with newline.
*/
error(message?:any,...optionalParams:any[]):void;
/**
* Increases indentation of subsequent lines by two spaces.
* If one or more `label`s are provided, those are printed first without the additional indentation.
*/
group(...label:any[]):void;
/**
* The `console.groupCollapsed()` function is an alias for {@link console.group}.
*/
groupCollapsed(...label:any[]):void;
/**
* Decreases indentation of subsequent lines by two spaces.
*/
groupEnd():void;
/**
* The {@link console.info} function is an alias for {@link console.log}.
*/
info(message?:any,...optionalParams:any[]):void;
/**
* Prints to `stdout` with newline.
*/
log(message?:any,...optionalParams:any[]):void;
/**
* This method does not display anything unless used in the inspector.
* Prints to `stdout` the array `array` formatted as a table.