From 887625194bddfad0ebb6a419cc6474c31c3f7d54 Mon Sep 17 00:00:00 2001 From: Andreas Zahnen Date: Thu, 2 Jan 2025 18:28:58 +0100 Subject: [PATCH] records --- libxtracfg/js/types/generate-java-classes.ts | 3 +-- libxtracfg/js/types/src/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/libxtracfg/js/types/generate-java-classes.ts b/libxtracfg/js/types/generate-java-classes.ts index f6f7675..d83fb95 100644 --- a/libxtracfg/js/types/generate-java-classes.ts +++ b/libxtracfg/js/types/generate-java-classes.ts @@ -6,7 +6,6 @@ import { generateClass, generateJava } from "./java/index.ts"; const dataNs = ["Command", "Options", "Result"]; const suffixNs = ["Command", "Options"]; const commandNs = "Command"; -const baseOptions = "BaseOptions"; const baseResult = "BaseResult"; const failureResult = "FailureResult"; @@ -130,7 +129,7 @@ public abstract class Handler {}); + ${result} result = handle(new ${initCommand}(command.options()), false, ignore -> {}); if (result instanceof ${failure}) { return result; diff --git a/libxtracfg/js/types/src/index.ts b/libxtracfg/js/types/src/index.ts index 2de852f..3a4cf2e 100644 --- a/libxtracfg/js/types/src/index.ts +++ b/libxtracfg/js/types/src/index.ts @@ -82,9 +82,9 @@ export namespace Command { */ export class Connect extends Base { declare readonly command: Enums.Main.Connect; - declare readonly options: Options.Base; + declare readonly options: Options.Options; - constructor(options: Options.Base = {}) { + constructor(options: Options.Options = {}) { super(Enums.Main.Connect, options); } }