Fix issue with es6 style import

This commit is contained in:
sean
2016-01-06 00:07:57 -08:00
parent dab0fb7cb7
commit 98b769b9e1
2 changed files with 13 additions and 21 deletions
@@ -1,5 +1,5 @@
///<reference path='applicationinsights.d.ts' />
import appInsights = require("applicationinsights");
import * as appInsights from "applicationinsights";
// basic use
appInsights.setup("<instrumentation_key>").start();
+12 -20
View File
@@ -409,66 +409,58 @@ interface Sender {
* The singleton meta interface for the default client of the client. This interface is used to setup/start and configure
* the auto-collection behavior of the application insights module.
*/
declare class ApplicationInsights {
static client: Client;
private static _isConsole;
private static _isExceptions;
private static _isPerformance;
private static _isRequests;
private static _console;
private static _exceptions;
private static _performance;
private static _requests;
private static _isStarted;
interface ApplicationInsights {
client: Client;
/**
* Initializes a client with the given instrumentation key, if this is not specified, the value will be
* read from the environment variable APPINSIGHTS_INSTRUMENTATIONKEY
* @returns {ApplicationInsights/Client} a new client
*/
static getClient(instrumentationKey?: string): Client;
getClient(instrumentationKey?: string): Client;
/**
* Initializes the default client of the client and sets the default configuration
* @param instrumentationKey the instrumentation key to use. Optional, if this is not specified, the value will be
* read from the environment variable APPINSIGHTS_INSTRUMENTATIONKEY
* @returns {ApplicationInsights} this interface
*/
static setup(instrumentationKey?: string): typeof ApplicationInsights;
setup(instrumentationKey?: string): ApplicationInsights;
/**
* Starts automatic collection of telemetry. Prior to calling start no telemetry will be collected
* @returns {ApplicationInsights} this interface
*/
static start(): typeof ApplicationInsights;
start(): ApplicationInsights;
/**
* Sets the state of console tracking (enabled by default)
* @param value if true console activity will be sent to Application Insights
* @returns {ApplicationInsights} this interface
*/
static setAutoCollectConsole(value: boolean): typeof ApplicationInsights;
setAutoCollectConsole(value: boolean): ApplicationInsights;
/**
* Sets the state of exception tracking (enabled by default)
* @param value if true uncaught exceptions will be sent to Application Insights
* @returns {ApplicationInsights} this interface
*/
static setAutoCollectExceptions(value: boolean): typeof ApplicationInsights;
setAutoCollectExceptions(value: boolean): ApplicationInsights;
/**
* Sets the state of performance tracking (enabled by default)
* @param value if true performance counters will be collected every second and sent to Application Insights
* @returns {ApplicationInsights} this interface
*/
static setAutoCollectPerformance(value: boolean): typeof ApplicationInsights;
setAutoCollectPerformance(value: boolean): ApplicationInsights;
/**
* Sets the state of request tracking (enabled by default)
* @param value if true requests will be sent to Application Insights
* @returns {ApplicationInsights} this interface
*/
static setAutoCollectRequests(value: boolean): typeof ApplicationInsights;
setAutoCollectRequests(value: boolean): ApplicationInsights;
/**
* Enables verbose debug logging
* @returns {ApplicationInsights} this interface
*/
static enableVerboseLogging(): typeof ApplicationInsights;
enableVerboseLogging(): ApplicationInsights;
}
declare module "applicationinsights" {
export = ApplicationInsights;
const applicationinsights: ApplicationInsights;
export = applicationinsights;
}