ducjs
Version:
The duc 2D CAD file format is a cornerstone of our advanced design system, conceived to cater to professionals seeking precision and efficiency in their design work.
27 lines (26 loc) • 1.4 kB
JavaScript
// automatically generated by the FlatBuffers compiler, do not modify
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import { LeaderBlockContent } from '../duc/leader-block-content';
import { LeaderTextBlockContent } from '../duc/leader-text-block-content';
export var LeaderContentData;
(function (LeaderContentData) {
LeaderContentData[LeaderContentData["NONE"] = 0] = "NONE";
LeaderContentData[LeaderContentData["LeaderTextBlockContent"] = 1] = "LeaderTextBlockContent";
LeaderContentData[LeaderContentData["LeaderBlockContent"] = 2] = "LeaderBlockContent";
})(LeaderContentData || (LeaderContentData = {}));
export function unionToLeaderContentData(type, accessor) {
switch (LeaderContentData[type]) {
case 'NONE': return null;
case 'LeaderTextBlockContent': return accessor(new LeaderTextBlockContent());
case 'LeaderBlockContent': return accessor(new LeaderBlockContent());
default: return null;
}
}
export function unionListToLeaderContentData(type, accessor, index) {
switch (LeaderContentData[type]) {
case 'NONE': return null;
case 'LeaderTextBlockContent': return accessor(index, new LeaderTextBlockContent());
case 'LeaderBlockContent': return accessor(index, new LeaderBlockContent());
default: return null;
}
}