1
0
Fork 0
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:
chainhelen 2018-06-06 12:28:36 +08:00 committed by Ryan Dahl
parent 6d4135f437
commit 4d3e684366

View file

@ -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);
}
}