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:
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>
|
// 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue