From b6bc57bc830496278c5daf9e97ef2c0d59189042 Mon Sep 17 00:00:00 2001 From: Shiv Bijlani Date: Wed, 5 Apr 2017 01:21:46 -0400 Subject: [PATCH 1/2] Fix for issue #3: Implement Telemetry public API surface --- lib/Telemetry.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 lib/Telemetry.ts diff --git a/lib/Telemetry.ts b/lib/Telemetry.ts new file mode 100644 index 0000000000..dcbf07c423 --- /dev/null +++ b/lib/Telemetry.ts @@ -0,0 +1,17 @@ +namespace MSAL { + class Telmetry { + private static instance: Telmetry; + private receiverCallback: (r: Array) => void; + + private constructor() { + } + + RegisterReceiver(receiverCallback: (receiver: Array) => void): void { + this.receiverCallback = receiverCallback; + } + + static GetInstance(): Telmetry { + return this.instance || (this.instance = new this()); + } + } +} \ No newline at end of file From 078ac802633cb9d2d8c18b756fb58a3c160c6d7d Mon Sep 17 00:00:00 2001 From: Shiv Bijlani Date: Wed, 5 Apr 2017 01:54:17 -0400 Subject: [PATCH 2/2] Fix typo --- lib/Telemetry.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Telemetry.ts b/lib/Telemetry.ts index dcbf07c423..2761c03034 100644 --- a/lib/Telemetry.ts +++ b/lib/Telemetry.ts @@ -1,6 +1,6 @@ namespace MSAL { - class Telmetry { - private static instance: Telmetry; + export class Telemetry { + private static instance: Telemetry; private receiverCallback: (r: Array) => void; private constructor() { @@ -10,7 +10,7 @@ namespace MSAL { this.receiverCallback = receiverCallback; } - static GetInstance(): Telmetry { + static GetInstance(): Telemetry { return this.instance || (this.instance = new this()); } }