// automatically generated by the FlatBuffers compiler, do not modify import { TableInNestedNS, TableInNestedNST } from '../../namespace-a/namespace-b/table-in-nested-n-s'; export enum UnionInNestedNS{ NONE = 0, TableInNestedNS = 1 } export function unionToUnionInNestedNS( type: UnionInNestedNS, accessor: (obj:TableInNestedNS) => TableInNestedNS|null ): TableInNestedNS|null { switch(UnionInNestedNS[type]) { case 'NONE': return null; case 'TableInNestedNS': return accessor(new TableInNestedNS())! as TableInNestedNS; default: return null; } } export function unionListToUnionInNestedNS( type: UnionInNestedNS, accessor: (index: number, obj:TableInNestedNS) => TableInNestedNS|null, index: number ): TableInNestedNS|null { switch(UnionInNestedNS[type]) { case 'NONE': return null; case 'TableInNestedNS': return accessor(index, new TableInNestedNS())! as TableInNestedNS; default: return null; } }