diff options
author | Jonathon Orsi <jonathon.orsi@gmail.com> | 2019-04-07 20:51:43 -0400 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2019-04-07 20:51:43 -0400 |
commit | 3452a10840ef47bb5546969ebe776289c7b095f1 (patch) | |
tree | 165439d870c7fdc2b914d9e008162ea7c17b4cb2 /js/repl.ts | |
parent | 86aee7f13751bd4707f6c2fe367be2359fde84b2 (diff) |
use flatbuffer create functions to add fields (#2046)
Diffstat (limited to 'js/repl.ts')
-rw-r--r-- | js/repl.ts | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/js/repl.ts b/js/repl.ts index 350aff867..e521bf581 100644 --- a/js/repl.ts +++ b/js/repl.ts @@ -30,10 +30,7 @@ const replCommands = { function startRepl(historyFile: string): number { const builder = flatbuffers.createBuilder(); const historyFile_ = builder.createString(historyFile); - - msg.ReplStart.startReplStart(builder); - msg.ReplStart.addHistoryFile(builder, historyFile_); - const inner = msg.ReplStart.endReplStart(builder); + const inner = msg.ReplStart.createReplStart(builder, historyFile_); const baseRes = dispatch.sendSync(builder, msg.Any.ReplStart, inner); assert(baseRes != null); @@ -48,10 +45,7 @@ function startRepl(historyFile: string): number { export async function readline(rid: number, prompt: string): Promise<string> { const builder = flatbuffers.createBuilder(); const prompt_ = builder.createString(prompt); - msg.ReplReadline.startReplReadline(builder); - msg.ReplReadline.addRid(builder, rid); - msg.ReplReadline.addPrompt(builder, prompt_); - const inner = msg.ReplReadline.endReplReadline(builder); + const inner = msg.ReplReadline.createReplReadline(builder, rid, prompt_); const baseRes = await dispatch.sendAsync( builder, |