From 0cf6a5c25913be72024fdba2b813339ba12c3a5b Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Fri, 29 Jul 2016 14:09:07 -0700 Subject: [PATCH 01/13] Fix for TS future literal support --- tcomb/tcomb-tests.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tcomb/tcomb-tests.ts b/tcomb/tcomb-tests.ts index 2bf76261f3..d34d6feec8 100644 --- a/tcomb/tcomb-tests.ts +++ b/tcomb/tcomb-tests.ts @@ -333,19 +333,19 @@ describe('assert', function () { it('should throw a default message', function () { throwsWithMessage(function () { - assert(1 === 2); + assert(1 === 2 + 1); }, 'assert failed'); }); it('should throw the specified message', function () { throwsWithMessage(function () { - assert(1 === 2, 'my message'); + assert(1 === 2 + 1, 'my message'); }, 'my message'); }); it('should format the specified message', function () { throwsWithMessage(function () { - assert(1 === 2, '%s !== %s', 1, 2); + assert(1 === 2 + 1, '%s !== %s', 1, 2); }, '1 !== 2'); }); @@ -359,7 +359,7 @@ describe('assert', function () { } }; doesNotThrow(function () { - assert(1 === 2, 'report error'); + assert(1 === 2 + 1, 'report error'); }); t.fail = fail; }); From 0cccb7f2b85f00f2a4660d1084aa26f857613264 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Sat, 30 Jul 2016 07:59:46 -0700 Subject: [PATCH 02/13] Fix breaking change from Microsoft/TypeScript#10039 --- voximplant-websdk/index.d.ts | 8 ++++---- voximplant-websdk/voximplant-websdk-tests.ts | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/voximplant-websdk/index.d.ts b/voximplant-websdk/index.d.ts index c292338743..1cf19ebc5e 100644 --- a/voximplant-websdk/index.d.ts +++ b/voximplant-websdk/index.d.ts @@ -80,7 +80,7 @@ declare namespace VoxImplant { TransferFailed } - namespace Events { + namespace EventTypes { /** * Event dispatched after login , loginWithOneTimeKey, requestOneTimeLoginKey or loginWithCode function call @@ -989,9 +989,9 @@ declare namespace VoxImplant { } - type VoxImplantEvent = Events.AuthResult | Events.ConnectionClosed | Events.ConnectionEstablished | - Events.ConnectionFailed | Events.IncomingCall | Events.MicAccessResult | - Events.NetStatsReceived | Events.PlaybackFinished | Events.SDKReady | Events.SourcesInfoUpdated; + type VoxImplantEvent = EventTypes.AuthResult | EventTypes.ConnectionClosed | EventTypes.ConnectionEstablished | + EventTypes.ConnectionFailed | EventTypes.IncomingCall | EventTypes.MicAccessResult | + EventTypes.NetStatsReceived | EventTypes.PlaybackFinished | EventTypes.SDKReady | EventTypes.SourcesInfoUpdated; type VoxImplantCallEvent = CallEvents.Connected | CallEvents.Disconnected | CallEvents.Failed | diff --git a/voximplant-websdk/voximplant-websdk-tests.ts b/voximplant-websdk/voximplant-websdk-tests.ts index 76b15f789d..b14ec4a7af 100644 --- a/voximplant-websdk/voximplant-websdk-tests.ts +++ b/voximplant-websdk/voximplant-websdk-tests.ts @@ -7,25 +7,25 @@ vox.init({ micRequired: true }); -vox.addEventListener(VoxImplant.Events.SDKReady, function(event: VoxImplant.Events.SDKReady) { +vox.addEventListener(VoxImplant.Events.SDKReady, function(event: VoxImplant.EventTypes.SDKReady) { console.log("VoxImplant SDK ver. " + event.version + " initialized"); vox.connect(); }); -vox.addEventListener(VoxImplant.Events.ConnectionEstablished, function(event: VoxImplant.Events.ConnectionEstablished) { +vox.addEventListener(VoxImplant.Events.ConnectionEstablished, function(event: VoxImplant.EventTypes.ConnectionEstablished) { console.log("Connection established"); vox.login("username", "password"); }); -vox.addEventListener(VoxImplant.Events.ConnectionClosed, function(event: VoxImplant.Events.ConnectionClosed) { +vox.addEventListener(VoxImplant.Events.ConnectionClosed, function(event: VoxImplant.EventTypes.ConnectionClosed) { console.log("Connection closed"); }); -vox.addEventListener(VoxImplant.Events.ConnectionFailed, function(event: VoxImplant.Events.ConnectionFailed) { +vox.addEventListener(VoxImplant.Events.ConnectionFailed, function(event: VoxImplant.EventTypes.ConnectionFailed) { console.log("Connection failed. Reason: " + event.message); }); -vox.addEventListener(VoxImplant.Events.AuthResult, function(event: VoxImplant.Events.AuthResult) { +vox.addEventListener(VoxImplant.Events.AuthResult, function(event: VoxImplant.EventTypes.AuthResult) { if (event.result === true) { // Authorized successfully console.log("Logged in as " + event.displayName); @@ -48,11 +48,11 @@ vox.addEventListener(VoxImplant.Events.AuthResult, function(event: VoxImplant.Ev } }); -vox.addEventListener(VoxImplant.Events.MicAccessResult, function(event: VoxImplant.Events.MicAccessResult) { +vox.addEventListener(VoxImplant.Events.MicAccessResult, function(event: VoxImplant.EventTypes.MicAccessResult) { console.log("Microphone access allowed: " + event.result); }); -vox.addEventListener(VoxImplant.Events.IncomingCall, function(event: VoxImplant.Events.IncomingCall) { +vox.addEventListener(VoxImplant.Events.IncomingCall, function(event: VoxImplant.EventTypes.IncomingCall) { call = event.call; call.addEventListener(VoxImplant.CallEvents.Connected, function(callevent: VoxImplant.CallEvents.Connected) { console.log("Inbound Call Connected"); @@ -67,7 +67,7 @@ vox.addEventListener(VoxImplant.IMEvents.MessageReceived, function(event: VoxImp console.log("Message received: " + event.content + " from " + event.id + " id " + event.message_id); }); -vox.addEventListener(VoxImplant.Events.SourcesInfoUpdated, function(event: VoxImplant.Events.SourcesInfoUpdated) { +vox.addEventListener(VoxImplant.Events.SourcesInfoUpdated, function(event: VoxImplant.EventTypes.SourcesInfoUpdated) { var audioSources: VoxImplant.AudioSourceInfo[] = vox.audioSources(), videoSources: VoxImplant.VideoSourceInfo[] = vox.videoSources(); console.log("Received recording sources data:"); From 61692f71699e4d1769b5d58f37cae98474787706 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 1 Aug 2016 11:14:48 -0700 Subject: [PATCH 03/13] Work around issue in yeoman-generator --- yeoman-generator/yeoman-generator-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yeoman-generator/yeoman-generator-tests.ts b/yeoman-generator/yeoman-generator-tests.ts index cf4161ffb8..7fe4c993d1 100644 --- a/yeoman-generator/yeoman-generator-tests.ts +++ b/yeoman-generator/yeoman-generator-tests.ts @@ -175,7 +175,7 @@ generator.prompt({ name: 'Name', message: '', default: (answers) => 10 }, (answe generator.prompt({ name: 'Name', message: '', type: "list" }, (answer) => {}); generator.prompt({ name: 'Name', message: '', validate: (input) => true }, (answer) => {}); generator.prompt({ name: 'Name', message: '', validate: (input) => "Error" }, (answer) => {}); -generator.prompt({ name: 'Name', message: '', filter: (input) => input }, (answer) => {}); +generator.prompt({ name: 'Name', message: '', filter: (input: any) => input }, (answer) => {}); generator.prompt({ name: 'Name', message: '', when: (answers) => true }, (answer) => {}); generator.prompt({ name: 'Name', message: '', when: true }, (answer) => {}); From e4f0ef9a02c7f6848c63616ab464fa1dabe69e2c Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 1 Aug 2016 12:08:50 -0700 Subject: [PATCH 04/13] Work around TypeScript#10073 --- valerie/valerie-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/valerie/valerie-tests.ts b/valerie/valerie-tests.ts index 30ca6576b7..227afc246b 100644 --- a/valerie/valerie-tests.ts +++ b/valerie/valerie-tests.ts @@ -303,7 +303,7 @@ function UtilsStaticTests() { var t2 = valerie.utils.asArray([1,2]); var t3 = valerie.utils.asFunction(1); - var t4 = valerie.utils.asFunction(() => { return 1; }); + var t4 = valerie.utils.asFunction((): number => { return 1; }); var t5 = valerie.utils.isArray([1, 2]); var t5 = valerie.utils.isArrayOrObject(1); From e2363f78798eed2c177f6fab9c2705d88526f565 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 1 Aug 2016 12:11:57 -0700 Subject: [PATCH 05/13] Work around TypeScript#10073 --- redux/redux-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/redux/redux-tests.ts b/redux/redux-tests.ts index 604b5ad268..395c5fde7f 100644 --- a/redux/redux-tests.ts +++ b/redux/redux-tests.ts @@ -173,7 +173,7 @@ namespace EnumTypeAction { const t2: string = R.compose(numberToString, numberToNumber)(5); const t3: string = R.compose(numberToString, stringToNumber)("f"); const t4: (a: string) => number = R.compose( - (f: (a: string) => number) => ((p: string) => 5), + (f: (a: string) => number) => ((p: string): number => 5), (f: (a: number) => string) => ((p: string) => 4) )(numberToString); From aa1fffa13866b8b5db97d67b78f5a074bae25df6 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 1 Aug 2016 12:12:47 -0700 Subject: [PATCH 06/13] Remove duplicated function names --- whatwg-fetch/whatwg-fetch-tests.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/whatwg-fetch/whatwg-fetch-tests.ts b/whatwg-fetch/whatwg-fetch-tests.ts index 97141e0eef..3a27d58d20 100644 --- a/whatwg-fetch/whatwg-fetch-tests.ts +++ b/whatwg-fetch/whatwg-fetch-tests.ts @@ -1,38 +1,38 @@  -function test_HeadersCopiedFromHeaders() { +function test_HeadersCopiedFromHeaders1() { var source = new Headers(); source.append('Content-Type', 'application/json'); return new Headers(source); } -function test_HeadersCopiedFromHash() { +function test_HeadersCopiedFromHash1() { var source:HeadersMap = { 'Content-Type': 'application/json' }; return new Headers(source); } -function test_HeadersCopiedFromHeaders() { +function test_HeadersCopiedFromHeaders2() { var source = new Headers(); source.append('Content-Type', 'application/json'); return new Headers(source); } -function test_HeadersCopiedFromHash() { +function test_HeadersCopiedFromHash2() { var source:HeadersMap = { 'Content-Type': 'application/json' }; return new Headers(source); } -function test_HeadersCopiedFromHeaders() { +function test_HeadersCopiedFromHeaders3() { var source = new Headers(); source.append('Content-Type', 'application/json'); return new Headers(source); } -function test_HeadersCopiedFromHash() { +function test_HeadersCopiedFromHash3() { var source:HeadersMap = { 'Content-Type': 'application/json' }; From 14e3ddc9a916475d43f97273c9aa5578b642fba0 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 1 Aug 2016 12:13:44 -0700 Subject: [PATCH 07/13] Remove incorrect declaration --- sanitize-html/index.d.ts | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sanitize-html/index.d.ts b/sanitize-html/index.d.ts index c5be474222..f8602d3a5b 100644 --- a/sanitize-html/index.d.ts +++ b/sanitize-html/index.d.ts @@ -7,7 +7,6 @@ export = sanitize; declare function sanitize(dirty: string, options?: sanitize.IOptions): string; - declare namespace sanitize { type Attributes = { [attr: string]: string }; @@ -52,8 +51,3 @@ declare namespace sanitize { function simpleTransform(tagName: string, attribs: Attributes, merge?: boolean): Transformer; } - - -declare module 'sanitize-html' { - export = sanitize; -} From 2a8388dae5cfc0368e4a2eb445ca3ec4bd005867 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 1 Aug 2016 12:16:12 -0700 Subject: [PATCH 08/13] Remove incorrect API usage? --- highcharts/highcharts-tests.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/highcharts/highcharts-tests.ts b/highcharts/highcharts-tests.ts index 890c1798af..d36085ac92 100644 --- a/highcharts/highcharts-tests.ts +++ b/highcharts/highcharts-tests.ts @@ -1849,11 +1849,6 @@ function test_SolidGauge() { enabled: false }, yAxis: { - stops: [ - [0.1, '#55BF3B'], // green - [0.5, '#DDDF0D'], // yellow - [0.9, '#DF5353'] // red - ], lineWidth: 0, minorTickInterval: null, tickPixelInterval: 400, From 2b6518baf8dc4a69962b65331f88a3ab13f7dc62 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 1 Aug 2016 12:17:19 -0700 Subject: [PATCH 09/13] Update reference directive --- fetch-mock/fetch-mock.d.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fetch-mock/fetch-mock.d.ts b/fetch-mock/fetch-mock.d.ts index 490b4c7dfd..33dab7c079 100644 --- a/fetch-mock/fetch-mock.d.ts +++ b/fetch-mock/fetch-mock.d.ts @@ -2,7 +2,8 @@ // Project: https://github.com/wheresrhys/fetch-mock // Definitions by: Alexey Svetliakov , Tamir Duberstein // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped -/// + +/// declare module "fetch-mock" { type MockRequest = Request | RequestInit; From 31afb6ef0b2ce49e4fb92043ffb9c0f030377390 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 1 Aug 2016 12:18:23 -0700 Subject: [PATCH 10/13] Remove incorrect API usage? --- electron/github-electron-main-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electron/github-electron-main-tests.ts b/electron/github-electron-main-tests.ts index 0f2d1f6aa3..d3fb48021a 100644 --- a/electron/github-electron-main-tests.ts +++ b/electron/github-electron-main-tests.ts @@ -284,7 +284,7 @@ app.on('ready', () => { app.commandLine.appendSwitch('remote-debugging-port', '8315'); app.commandLine.appendSwitch('host-rules', 'MAP * 127.0.0.1'); -app.commandLine.appendSwitch('v', -1); +app.commandLine.appendSwitch('v', '-1'); app.commandLine.appendSwitch('vmodule', 'console=0'); // systemPreferences From 3a4d3042b54d36e8f55b8eb7bfc1f42401b92c91 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 1 Aug 2016 12:23:40 -0700 Subject: [PATCH 11/13] Work around TypeScript#10073 --- compose-function/compose-function-tests.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose-function/compose-function-tests.ts b/compose-function/compose-function-tests.ts index 52135f25a5..569233b264 100644 --- a/compose-function/compose-function-tests.ts +++ b/compose-function/compose-function-tests.ts @@ -8,7 +8,7 @@ const t1: number = composeFunction(numberToNumber, numberToNumber)(5); const t2: string = composeFunction(numberToString, numberToNumber)(5); const t3: string = composeFunction(numberToString, stringToNumber)("f"); const t4: (a: string) => number = composeFunction( - (f: (a: string) => number) => ((p: string) => 5), + (f: (a: string) => number) => ((p: string): number => 5), (f: (a: number) => string) => ((p: string) => 4) )(numberToString); From 0db3cdf6264f566bb328bcd54a3ae826465936b5 Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 1 Aug 2016 12:46:52 -0700 Subject: [PATCH 12/13] Make promise type more optimistic --- .../cordova-plugin-app-version-tests.ts | 1 - cordova-plugin-app-version/index.d.ts | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/cordova-plugin-app-version/cordova-plugin-app-version-tests.ts b/cordova-plugin-app-version/cordova-plugin-app-version-tests.ts index 36be88bfa4..980d1343ef 100644 --- a/cordova-plugin-app-version/cordova-plugin-app-version-tests.ts +++ b/cordova-plugin-app-version/cordova-plugin-app-version-tests.ts @@ -1,6 +1,5 @@ /// - cordova.getAppVersion.getAppName() .then(appName=> { console.log(appName) diff --git a/cordova-plugin-app-version/index.d.ts b/cordova-plugin-app-version/index.d.ts index f6783d8951..ac250ae765 100644 --- a/cordova-plugin-app-version/index.d.ts +++ b/cordova-plugin-app-version/index.d.ts @@ -8,9 +8,9 @@ interface Cordova { getAppVersion: { - getAppName: () => Q.IPromise | JQueryPromise; - getPackageName: () => Q.IPromise | JQueryPromise; - getVersionCode: () => Q.IPromise | JQueryPromise; - getVersionNumber: () => Q.IPromise | JQueryPromise; + getAppName: () => Q.IPromise & JQueryPromise; + getPackageName: () => Q.IPromise & JQueryPromise; + getVersionCode: () => Q.IPromise & JQueryPromise; + getVersionNumber: () => Q.IPromise & JQueryPromise; }; -} \ No newline at end of file +} From 58f432a688434df4ce5757306fd854589a23340a Mon Sep 17 00:00:00 2001 From: Ryan Cavanaugh Date: Mon, 1 Aug 2016 13:00:12 -0700 Subject: [PATCH 13/13] Rename type namespaces to remove conflict with enum --- voximplant-websdk/index.d.ts | 34 ++++++++++---------- voximplant-websdk/voximplant-websdk-tests.ts | 14 ++++---- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/voximplant-websdk/index.d.ts b/voximplant-websdk/index.d.ts index 1cf19ebc5e..670b13b46c 100644 --- a/voximplant-websdk/index.d.ts +++ b/voximplant-websdk/index.d.ts @@ -184,7 +184,7 @@ declare namespace VoxImplant { } - namespace CallEvents { + namespace CallEventTypes { /** * Event dispatched after call was connected @@ -323,7 +323,7 @@ declare namespace VoxImplant { } } - namespace IMEvents { + namespace IMEventTypes { /** * Event dispatched when chat history received @@ -994,22 +994,22 @@ declare namespace VoxImplant { EventTypes.NetStatsReceived | EventTypes.PlaybackFinished | EventTypes.SDKReady | EventTypes.SourcesInfoUpdated; - type VoxImplantCallEvent = CallEvents.Connected | CallEvents.Disconnected | CallEvents.Failed | - CallEvents.InfoReceived | CallEvents.MessageReceived | CallEvents.ProgressToneStart | - CallEvents.ProgressToneStop | CallEvents.TransferComplete | CallEvents.TransferFailed; + type VoxImplantCallEvent = CallEventTypes.Connected | CallEventTypes.Disconnected | CallEventTypes.Failed | + CallEventTypes.InfoReceived | CallEventTypes.MessageReceived | CallEventTypes.ProgressToneStart | + CallEventTypes.ProgressToneStop | CallEventTypes.TransferComplete | CallEventTypes.TransferFailed; - type VoxImplantIMEvent = IMEvents.ChatHistoryReceived | IMEvents.ChatRoomBanList | - IMEvents.ChatRoomCreated | IMEvents.ChatRoomError | IMEvents.ChatRoomHistoryReceived | - IMEvents.ChatRoomInfo | IMEvents.ChatRoomInvitation | IMEvents.ChatRoomInviteDeclined | - IMEvents.ChatRoomMessageModified | IMEvents.ChatRoomMessageNotModified | IMEvents.ChatRoomMessageReceived | - IMEvents.ChatRoomMessageRemoved | IMEvents.ChatRoomNewParticipant | IMEvents.ChatRoomOperation | - IMEvents.ChatRoomParticipantExit | IMEvents.ChatRoomParticipants | IMEvents.ChatRoomPresenceUpdate | - IMEvents.ChatRoomStateUpdate | IMEvents.ChatRoomSubjectChange | IMEvents.ChatRoomsDataReceived | - IMEvents.ChatStateUpdate | IMEvents.MessageModified | IMEvents.MessageNotModified | - IMEvents.MessageReceived | IMEvents.MessageRemoved | IMEvents.MessageStatus | - IMEvents.PresenceUpdate | IMEvents.RosterItemChange | IMEvents.RosterPresenceUpdate | - IMEvents.RosterReceived | IMEvents.SubscriptionRequest | IMEvents.SystemError | - IMEvents.UCConnected | IMEvents.UCDisconnected; + type VoxImplantIMEvent = IMEventTypes.ChatHistoryReceived | IMEventTypes.ChatRoomBanList | + IMEventTypes.ChatRoomCreated | IMEventTypes.ChatRoomError | IMEventTypes.ChatRoomHistoryReceived | + IMEventTypes.ChatRoomInfo | IMEventTypes.ChatRoomInvitation | IMEventTypes.ChatRoomInviteDeclined | + IMEventTypes.ChatRoomMessageModified | IMEventTypes.ChatRoomMessageNotModified | IMEventTypes.ChatRoomMessageReceived | + IMEventTypes.ChatRoomMessageRemoved | IMEventTypes.ChatRoomNewParticipant | IMEventTypes.ChatRoomOperation | + IMEventTypes.ChatRoomParticipantExit | IMEventTypes.ChatRoomParticipants | IMEventTypes.ChatRoomPresenceUpdate | + IMEventTypes.ChatRoomStateUpdate | IMEventTypes.ChatRoomSubjectChange | IMEventTypes.ChatRoomsDataReceived | + IMEventTypes.ChatStateUpdate | IMEventTypes.MessageModified | IMEventTypes.MessageNotModified | + IMEventTypes.MessageReceived | IMEventTypes.MessageRemoved | IMEventTypes.MessageStatus | + IMEventTypes.PresenceUpdate | IMEventTypes.RosterItemChange | IMEventTypes.RosterPresenceUpdate | + IMEventTypes.RosterReceived | IMEventTypes.SubscriptionRequest | IMEventTypes.SystemError | + IMEventTypes.UCConnected | IMEventTypes.UCDisconnected; /** * VoxImplant SDK Configuration diff --git a/voximplant-websdk/voximplant-websdk-tests.ts b/voximplant-websdk/voximplant-websdk-tests.ts index b14ec4a7af..29b14107e3 100644 --- a/voximplant-websdk/voximplant-websdk-tests.ts +++ b/voximplant-websdk/voximplant-websdk-tests.ts @@ -31,13 +31,13 @@ vox.addEventListener(VoxImplant.Events.AuthResult, function(event: VoxImplant.Ev console.log("Logged in as " + event.displayName); call = vox.call("some_number", false); - call.addEventListener(VoxImplant.CallEvents.Connected, function(callevent: VoxImplant.CallEvents.Connected) { + call.addEventListener(VoxImplant.CallEvents.Connected, function(callevent: VoxImplant.CallEventTypes.Connected) { console.log("Call connected"); }); - call.addEventListener(VoxImplant.CallEvents.Failed, function(callevent: VoxImplant.CallEvents.Failed) { + call.addEventListener(VoxImplant.CallEvents.Failed, function(callevent: VoxImplant.CallEventTypes.Failed) { console.log("Call failed, reason: " + callevent.reason); }); - call.addEventListener(VoxImplant.CallEvents.Disconnected, function(callevent: VoxImplant.CallEvents.Disconnected) { + call.addEventListener(VoxImplant.CallEvents.Disconnected, function(callevent: VoxImplant.CallEventTypes.Disconnected) { console.log("Call disconnected"); }); @@ -54,7 +54,7 @@ vox.addEventListener(VoxImplant.Events.MicAccessResult, function(event: VoxImpla vox.addEventListener(VoxImplant.Events.IncomingCall, function(event: VoxImplant.EventTypes.IncomingCall) { call = event.call; - call.addEventListener(VoxImplant.CallEvents.Connected, function(callevent: VoxImplant.CallEvents.Connected) { + call.addEventListener(VoxImplant.CallEvents.Connected, function(callevent: VoxImplant.CallEventTypes.Connected) { console.log("Inbound Call Connected"); setTimeout(function() { vox.disconnect(); @@ -63,7 +63,7 @@ vox.addEventListener(VoxImplant.Events.IncomingCall, function(event: VoxImplant. call.answer(); }); -vox.addEventListener(VoxImplant.IMEvents.MessageReceived, function(event: VoxImplant.IMEvents.MessageReceived) { +vox.addEventListener(VoxImplant.IMEvents.MessageReceived, function(event: VoxImplant.IMEventTypes.MessageReceived) { console.log("Message received: " + event.content + " from " + event.id + " id " + event.message_id); }); @@ -78,12 +78,12 @@ vox.addEventListener(VoxImplant.Events.SourcesInfoUpdated, function(event: VoxIm vox.useVideoSource(videoSources[0].id, function() { console.log('OK'); }, function() { console.log('Failed'); }); }); -vox.addEventListener(VoxImplant.IMEvents.RosterReceived, function(event: VoxImplant.IMEvents.RosterReceived) { +vox.addEventListener(VoxImplant.IMEvents.RosterReceived, function(event: VoxImplant.IMEventTypes.RosterReceived) { var roster: VoxImplant.RosterItem[] = event.roster; console.log("Roster received: " + roster); }); -vox.addEventListener(VoxImplant.IMEvents.ChatRoomBanList, function(event: VoxImplant.IMEvents.ChatRoomBanList) { +vox.addEventListener(VoxImplant.IMEvents.ChatRoomBanList, function(event: VoxImplant.IMEventTypes.ChatRoomBanList) { console.log("Banned participants: " + event.participants + " in room " + event.room); });