Improve TS types to support isolatedModules and isolatedDeclarations

This commit is contained in:
Björn Harrtell
2026-04-08 05:42:18 +02:00
parent e223d69b36
commit 496f10525b
249 changed files with 12736 additions and 14776 deletions

View File

@@ -1,35 +1,26 @@
// 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 {FallingTub} from './falling-tub.js';
import {HandFan} from './hand-fan.js';
/* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/no-explicit-any, @typescript-eslint/no-non-null-assertion */
import { FallingTub } from './falling-tub.js';
import { HandFan } from './hand-fan.js';
export var Gadget;
(function(Gadget) {
Gadget[Gadget['NONE'] = 0] = 'NONE';
Gadget[Gadget['FallingTub'] = 1] = 'FallingTub';
Gadget[Gadget['HandFan'] = 2] = 'HandFan';
(function (Gadget) {
Gadget[Gadget["NONE"] = 0] = "NONE";
Gadget[Gadget["FallingTub"] = 1] = "FallingTub";
Gadget[Gadget["HandFan"] = 2] = "HandFan";
})(Gadget || (Gadget = {}));
export function unionToGadget(type, accessor) {
switch (Gadget[type]) {
case 'NONE':
return null;
case 'FallingTub':
return accessor(new FallingTub());
case 'HandFan':
return accessor(new HandFan());
default:
return null;
}
switch (Gadget[type]) {
case 'NONE': return null;
case 'FallingTub': return accessor(new FallingTub());
case 'HandFan': return accessor(new HandFan());
default: return null;
}
}
export function unionListToGadget(type, accessor, index) {
switch (Gadget[type]) {
case 'NONE':
return null;
case 'FallingTub':
return accessor(index, new FallingTub());
case 'HandFan':
return accessor(index, new HandFan());
default:
return null;
}
switch (Gadget[type]) {
case 'NONE': return null;
case 'FallingTub': return accessor(index, new FallingTub());
case 'HandFan': return accessor(index, new HandFan());
default: return null;
}
}