Skip to content

Commit

Permalink
Fix issue with es6 style import
Browse files Browse the repository at this point in the history
  • Loading branch information
sean committed Jan 6, 2016
1 parent dab0fb7 commit 98b769b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 21 deletions.
2 changes: 1 addition & 1 deletion applicationinsights/applicationinsights-tests.ts
Original file line number Diff line number Diff line change
@@ -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();
Expand Down
32 changes: 12 additions & 20 deletions applicationinsights/applicationinsights.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 98b769b

Please sign in to comment.