1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -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 05ff9c85a1
commit 9800339439

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