1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-25 15:29:32 -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> // Copyright 2018 Ryan Dahl <ry@tinyclouds.org>
// All rights reserved. MIT License. // All rights reserved. MIT License.
import { assert, log, createResolvable, Resolvable } from "./util"; import {
import * as util from "./util"; assert,
log,
createResolvable,
Resolvable,
typedArrayToArrayBuffer
} from "./util";
import { pubInternal, sub } from "./dispatch"; import { pubInternal, sub } from "./dispatch";
import { main as pb } from "./msg.pb"; import { main as pb } from "./msg.pb";
@ -84,7 +89,7 @@ class FetchResponse implements Response {
this.onHeader(this); this.onHeader(this);
} else { } else {
// Body message. Assuming it all comes in one message now. // 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); this.bodyWaiter.resolve(ab);
} }
} }