From 11a4370e15bb519657c1deb33872d4edda4e542b Mon Sep 17 00:00:00 2001 From: Martin Probst Date: Thu, 16 Jan 2020 19:34:12 +0100 Subject: [PATCH] refactor(http): fix a strictBindCallApply issue. (#34817) `String.fromCharCode`'s type signature requires a regular `number[]`. PR Close #34817 --- packages/http/src/body.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/http/src/body.ts b/packages/http/src/body.ts index 97f7f04b7b..18e4c7b7e4 100644 --- a/packages/http/src/body.ts +++ b/packages/http/src/body.ts @@ -57,9 +57,13 @@ export abstract class Body { if (this._body instanceof ArrayBuffer) { switch (encodingHint) { case 'legacy': - return String.fromCharCode.apply(null, new Uint16Array(this._body)); + // TODO: Argument of type 'Uint16Array' is not assignable to parameter of type + // 'number[]'. + return String.fromCharCode.apply(null, new Uint16Array(this._body) as any); case 'iso-8859': - return String.fromCharCode.apply(null, new Uint8Array(this._body)); + // TODO: Argument of type 'Uint8Array' is not assignable to parameter of type + // 'number[]'. + return String.fromCharCode.apply(null, new Uint8Array(this._body) as any); default: throw new Error(`Invalid value for encodingHint: ${encodingHint}`); }