summaryrefslogtreecommitdiff
path: root/js/fetch.ts
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2018-10-03 21:12:23 -0400
committerRyan Dahl <ry@tinyclouds.org>2018-10-04 00:25:55 -0400
commitf774953011cb3ad85914bc9f5f66aa121f00528d (patch)
treee2943c332cd4d2af1fbbabf2e9b3ed879978b746 /js/fetch.ts
parent51dc46eff4a122543f4a290c00fa29e3b272f70f (diff)
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".
Diffstat (limited to 'js/fetch.ts')
-rw-r--r--js/fetch.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/js/fetch.ts b/js/fetch.ts
index 9cf117ed8..138454156 100644
--- a/js/fetch.ts
+++ b/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]);
}