Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions packages/http/src/body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
}
Expand Down