diff --git a/clients/ts/signalr/src/Utils.ts b/clients/ts/signalr/src/Utils.ts index 3bc5e2f1af..72d0ad875a 100644 --- a/clients/ts/signalr/src/Utils.ts +++ b/clients/ts/signalr/src/Utils.ts @@ -1,8 +1,6 @@ // Copyright (c) .NET Foundation. All rights reserved. // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -jasmine.DEFAULT_TIMEOUT_INTERVAL = 20000; - export class Arg { public static isRequired(val: any, name: string): void { if (val === null || val === undefined) { diff --git a/clients/ts/signalr/src/browser-index.ts b/clients/ts/signalr/src/browser-index.ts index 6b466ba7fe..643c0efe40 100644 --- a/clients/ts/signalr/src/browser-index.ts +++ b/clients/ts/signalr/src/browser-index.ts @@ -5,4 +5,20 @@ import "es6-promise/dist/es6-promise.auto.js"; +// Copy from Array.prototype into Uint8Array to polyfill on IE. It's OK because the implementations of indexOf and slice use properties +// that exist on Uint8Array with the same name, and JavaScript is magic. +// We make them 'writable' because the Buffer polyfill messes with it as well. +if (!Uint8Array.prototype.indexOf) { + Object.defineProperty(Uint8Array.prototype, "indexOf", { + value: Array.prototype.indexOf, + writable: true, + }); +} +if (!Uint8Array.prototype.slice) { + Object.defineProperty(Uint8Array.prototype, "slice", { + value: Array.prototype.slice, + writable: true, + }); +} + export * from "./index";