mirror of
https://github.com/denoland/deno.git
synced 2025-09-26 20:29:11 +00:00
Rename flatbuffer base.msg to base.inner
This better disambiguates with the msg_generated.ts module, which in JS we call "fbs", but would be better called "msg".
This commit is contained in:
parent
51dc46eff4
commit
f774953011
21 changed files with 204 additions and 204 deletions
16
js/fetch.ts
16
js/fetch.ts
|
@ -205,20 +205,20 @@ export async function fetch(
|
|||
);
|
||||
|
||||
// Decode FetchRes
|
||||
assert(fbs.Any.FetchRes === resBase.msgType());
|
||||
const msg = new fbs.FetchRes();
|
||||
assert(resBase.msg(msg) != null);
|
||||
assert(fbs.Any.FetchRes === resBase.innerType());
|
||||
const inner = new fbs.FetchRes();
|
||||
assert(resBase.inner(inner) != null);
|
||||
|
||||
const status = msg.status();
|
||||
const bodyArray = msg.bodyArray();
|
||||
const status = inner.status();
|
||||
const bodyArray = inner.bodyArray();
|
||||
assert(bodyArray != null);
|
||||
const body = typedArrayToArrayBuffer(bodyArray!);
|
||||
|
||||
const headersList: Array<[string, string]> = [];
|
||||
const len = msg.headerKeyLength();
|
||||
const len = inner.headerKeyLength();
|
||||
for (let i = 0; i < len; ++i) {
|
||||
const key = msg.headerKey(i);
|
||||
const value = msg.headerValue(i);
|
||||
const key = inner.headerKey(i);
|
||||
const value = inner.headerValue(i);
|
||||
headersList.push([key, value]);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue