mirror of
https://github.com/denoland/deno.git
synced 2024-11-24 15:19:26 -05:00
fetch:Avoid duplicate import about util
This commit is contained in:
parent
05ff9c85a1
commit
9800339439
1 changed files with 8 additions and 3 deletions
11
fetch.ts
11
fetch.ts
|
@ -1,7 +1,12 @@
|
|||
// Copyright 2018 Ryan Dahl <ry@tinyclouds.org>
|
||||
// All rights reserved. MIT License.
|
||||
import { assert, log, createResolvable, Resolvable } from "./util";
|
||||
import * as util from "./util";
|
||||
import {
|
||||
assert,
|
||||
log,
|
||||
createResolvable,
|
||||
Resolvable,
|
||||
typedArrayToArrayBuffer
|
||||
} from "./util";
|
||||
import { pubInternal, sub } from "./dispatch";
|
||||
import { main as pb } from "./msg.pb";
|
||||
|
||||
|
@ -84,7 +89,7 @@ class FetchResponse implements Response {
|
|||
this.onHeader(this);
|
||||
} else {
|
||||
// Body message. Assuming it all comes in one message now.
|
||||
const ab = util.typedArrayToArrayBuffer(msg.fetchResBody);
|
||||
const ab = typedArrayToArrayBuffer(msg.fetchResBody);
|
||||
this.bodyWaiter.resolve(ab);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue