22 lines
894 B
JavaScript
22 lines
894 B
JavaScript
// automatically generated by the FlatBuffers compiler, do not modify
|
|
import { TableInNestedNS } from '../../namespace-a/namespace-b/table-in-nested-n-s';
|
|
export var UnionInNestedNS;
|
|
(function (UnionInNestedNS) {
|
|
UnionInNestedNS[UnionInNestedNS["NONE"] = 0] = "NONE";
|
|
UnionInNestedNS[UnionInNestedNS["TableInNestedNS"] = 1] = "TableInNestedNS";
|
|
})(UnionInNestedNS || (UnionInNestedNS = {}));
|
|
export function unionToUnionInNestedNS(type, accessor) {
|
|
switch (UnionInNestedNS[type]) {
|
|
case 'NONE': return null;
|
|
case 'TableInNestedNS': return accessor(new TableInNestedNS());
|
|
default: return null;
|
|
}
|
|
}
|
|
export function unionListToUnionInNestedNS(type, accessor, index) {
|
|
switch (UnionInNestedNS[type]) {
|
|
case 'NONE': return null;
|
|
case 'TableInNestedNS': return accessor(index, new TableInNestedNS());
|
|
default: return null;
|
|
}
|
|
}
|