Fix up a bunch of typescript issues

These came to light with the typescript compiler upgrade that is
coming up soon with the bazel upgrade.

A lot of the changes in this patch arose from the changes in the
imports. For some reason we can no longer import modules the way we
used to. I'm not really sure how it ever worked. The upstream
documentation agrees with the changes we had to make here. It's
possible that the old version of typescript simply did things
differently when it comes to importing modules.

Change-Id: I054b5269c90cc94276e9f856d8cd79c8de2946f2
diff --git a/third_party/flatbuffers/ts/builder.ts b/third_party/flatbuffers/ts/builder.ts
index 6be72fb..137031e 100644
--- a/third_party/flatbuffers/ts/builder.ts
+++ b/third_party/flatbuffers/ts/builder.ts
@@ -604,7 +604,7 @@
      * @returns list of offsets of each non null object
      */
     createObjectOffsetList(list: string[]): Offset[] {
-      const ret = [];
+      const ret: number[] = [];
   
       for(let i = 0; i < list.length; ++i) {
         const val = list[i];
@@ -625,4 +625,4 @@
       this.createObjectOffsetList(list);
       return this.endVector();
     }
-  }
\ No newline at end of file
+  }