blob: b820bceacd6ce154dc07b8edb853e5229f3517e4 [file] [log] [blame]
James Kuszmaul8e62b022022-03-22 09:33:25 -07001// automatically generated by the FlatBuffers compiler, do not modify
2import { TableInNestedNS } from '../../namespace-a/namespace-b/table-in-nested-n-s';
3export var UnionInNestedNS;
4(function (UnionInNestedNS) {
5 UnionInNestedNS[UnionInNestedNS["NONE"] = 0] = "NONE";
6 UnionInNestedNS[UnionInNestedNS["TableInNestedNS"] = 1] = "TableInNestedNS";
7})(UnionInNestedNS || (UnionInNestedNS = {}));
8export function unionToUnionInNestedNS(type, accessor) {
9 switch (UnionInNestedNS[type]) {
10 case 'NONE': return null;
11 case 'TableInNestedNS': return accessor(new TableInNestedNS());
12 default: return null;
13 }
14}
15export function unionListToUnionInNestedNS(type, accessor, index) {
16 switch (UnionInNestedNS[type]) {
17 case 'NONE': return null;
18 case 'TableInNestedNS': return accessor(index, new TableInNestedNS());
19 default: return null;
20 }
21}