[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

4
ts/utils.ts Normal file
View File

@@ -0,0 +1,4 @@
export const int32 = new Int32Array(2);
export const float32 = new Float32Array(int32.buffer);
export const float64 = new Float64Array(int32.buffer);
export const isLittleEndian = new Uint16Array(new Uint8Array([1, 0]).buffer)[0] === 1;