mirror of
https://github.com/google/flatbuffers.git
synced 2026-07-03 22:24:11 +00:00
[JS/TS] Modernize TypeScript / JavaScript flatbuffers support (#6095)
This commit is contained in:
4
ts/utils.ts
Normal file
4
ts/utils.ts
Normal 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;
|
||||
Reference in New Issue
Block a user