[JS/TS] Modernize TypeScript / JavaScript flatbuffers support (#6095)

This commit is contained in:
Björn Harrtell
2020-09-17 21:21:14 +02:00
committed by GitHub
parent b8e87fafe4
commit 94873e595c
21 changed files with 2093 additions and 1404 deletions

14
ts/types.ts Normal file
View File

@@ -0,0 +1,14 @@
import { ByteBuffer } from './byte-buffer'
import { Builder } from './builder'
export type Offset = number;
export type Table = {
bb: ByteBuffer
bb_pos: number
};
export interface IGeneratedObject {
pack(builder:Builder): Offset
unpack(): IGeneratedObject
}