Skip to content

Commit fd83a2a

Browse files
committed
records
1 parent 4d906ca commit fd83a2a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

libxtracfg/js/types/generate-java-classes.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { generateClass, generateJava } from "./java/index.ts";
66
const dataNs = ["Command", "Options", "Result"];
77
const suffixNs = ["Command", "Options"];
88
const commandNs = "Command";
9+
const baseOptions = "BaseOptions";
910
const baseResult = "BaseResult";
1011
const failureResult = "FailureResult";
1112

@@ -129,7 +130,7 @@ public abstract class Handler<T extends Handler.Context, U extends Handler.Conte
129130
return notConnected();
130131
}
131132
132-
${result} result = handle(new ${initCommand}(command.options()), false, ignore -> {});
133+
${result} result = handle(new ${initCommand}((${baseOptions})command.options()), false, ignore -> {});
133134
134135
if (result instanceof ${failure}) {
135136
return result;

libxtracfg/js/types/src/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@ export namespace Command {
6969
//TODO: should be abstract so that it cannot be instantiated, but that breaks the JSON schema generation
7070
export class Base {
7171
readonly command: Enums.Main;
72-
readonly options: Options.Base;
72+
readonly options: Options.Options;
7373

74-
constructor(command: Enums.Main, options: Options.Base) {
74+
constructor(command: Enums.Main, options: Options.Options) {
7575
this.command = command;
7676
this.options = options;
7777
}

0 commit comments

Comments
 (0)