James Kuszmaul | 8e62b02 | 2022-03-22 09:33:25 -0700 | [diff] [blame^] | 1 | // automatically generated by the FlatBuffers compiler, do not modify |
| 2 | import { TableInNestedNS } from '../../namespace-a/namespace-b/table-in-nested-n-s'; |
| 3 | export var UnionInNestedNS; |
| 4 | (function (UnionInNestedNS) { |
| 5 | UnionInNestedNS[UnionInNestedNS["NONE"] = 0] = "NONE"; |
| 6 | UnionInNestedNS[UnionInNestedNS["TableInNestedNS"] = 1] = "TableInNestedNS"; |
| 7 | })(UnionInNestedNS || (UnionInNestedNS = {})); |
| 8 | export 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 | } |
| 15 | export 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 | } |