diff --git a/applicationinsights/applicationinsights-tests.ts b/applicationinsights/applicationinsights-tests.ts
index 8d4d83e9dc..2a4613b019 100644
--- a/applicationinsights/applicationinsights-tests.ts
+++ b/applicationinsights/applicationinsights-tests.ts
@@ -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);
+});
diff --git a/applicationinsights/applicationinsights.d.ts b/applicationinsights/applicationinsights.d.ts
index 9fc6f494d5..f5ea9d4134 100644
--- a/applicationinsights/applicationinsights.d.ts
+++ b/applicationinsights/applicationinsights.d.ts
@@ -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
// 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, tagOverrides?: {
[key: string]: string;
}): ContractsModule.Envelope;