Austin Schuh | 272c613 | 2020-11-14 16:37:52 -0800 | [diff] [blame^] | 1 | /* eslint-disable @typescript-eslint/no-namespace */ |
| 2 | import * as constants from './constants' |
| 3 | import * as types from './types' |
| 4 | import * as utils from './utils' |
| 5 | |
| 6 | import { Long as LongClass } from './long' |
| 7 | import { Encoding as EncodingEnum } from './encoding' |
| 8 | import { Builder as BuilderClass } from './builder' |
| 9 | import { ByteBuffer as ByteBufferClass } from './byte-buffer' |
| 10 | |
| 11 | export namespace flatbuffers { |
| 12 | |
| 13 | export type Offset = types.Offset; |
| 14 | |
| 15 | export type Table = types.Table; |
| 16 | |
| 17 | export const SIZEOF_SHORT = constants.SIZEOF_SHORT; |
| 18 | export const SIZEOF_INT = constants.SIZEOF_INT; |
| 19 | export const FILE_IDENTIFIER_LENGTH = constants.FILE_IDENTIFIER_LENGTH; |
| 20 | export const SIZE_PREFIX_LENGTH = constants.SIZE_PREFIX_LENGTH; |
| 21 | |
| 22 | export const Encoding = EncodingEnum; |
| 23 | |
| 24 | export const int32 = utils.int32; |
| 25 | export const float32 = utils.float32; |
| 26 | export const float64 = utils.float64; |
| 27 | export const isLittleEndian = utils.isLittleEndian; |
| 28 | |
| 29 | export const Long = LongClass; |
| 30 | export const Builder = BuilderClass; |
| 31 | export const ByteBuffer = ByteBufferClass; |
| 32 | } |
| 33 | |
| 34 | export default flatbuffers; |