summaryrefslogtreecommitdiff
path: root/js/truncate.ts
diff options
context:
space:
mode:
Diffstat (limited to 'js/truncate.ts')
-rw-r--r--js/truncate.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/js/truncate.ts b/js/truncate.ts
index c26eb8a74..1bd5a2c08 100644
--- a/js/truncate.ts
+++ b/js/truncate.ts
@@ -1,6 +1,6 @@
// Copyright 2018 the Deno authors. All rights reserved. MIT license.
import * as msg from "gen/msg_generated";
-import { flatbuffers } from "flatbuffers";
+import * as flatbuffers from "./flatbuffers";
import * as dispatch from "./dispatch";
/** Truncates or extends the specified file synchronously, updating the size of
@@ -30,7 +30,7 @@ function req(
name: string,
len?: number
): [flatbuffers.Builder, msg.Any, flatbuffers.Offset] {
- const builder = new flatbuffers.Builder();
+ const builder = flatbuffers.createBuilder();
const name_ = builder.createString(name);
len = len && len > 0 ? Math.floor(len) : 0;
msg.Truncate.startTruncate(builder);