Add callback parameter to sendPendingData method def'n

This commit is contained in:
Sean Lee
2016-01-05 15:50:39 -08:00
parent 6a6ad7068a
commit 41745c212a
2 changed files with 7 additions and 2 deletions
@@ -24,3 +24,8 @@ appInsights.client.trackDependency("dependency name", "commandName", 500, true);
appInsights.client.commonProperties = {
environment: "dev"
};
// send any pending data and log the response
appInsights.client.sendPendingData(function (response) {
console.log(response);
});
+2 -2
View File
@@ -1,4 +1,4 @@
// Type definitions for Application Insights v0.15.7
// Type definitions for Application Insights v0.15.8
// Project: https://github.com/Microsoft/ApplicationInsights-node.js
// Definitions by: Scott Southwood <https://github.com/scsouthw/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
@@ -358,7 +358,7 @@ interface Client {
/**
* Immediately send all queued telemetry.
*/
sendPendingData(): void;
sendPendingData(callback?: (response: string) => void): void;
getEnvelope(data: ContractsModule.Data<ContractsModule.Domain>, tagOverrides?: {
[key: string]: string;
}): ContractsModule.Envelope;