Skip to content

Commit a81f363

Browse files
josejuliogithub-actions[bot]
authored andcommitted
Updates ./dist/* files with latest changes
1 parent 047e5d8 commit a81f363

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

dist/MinecraftEventDrivenForm.d.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ declare class FormEventProducer {
145145
getInitialForm(): Form | undefined;
146146
iterator(): Generator<FormEvent, void, unknown>;
147147
}
148+
type FormType = "multi-button" | "input" | "dual-button";
149+
type LoadFormReturn<T extends FormType | undefined> = T extends "multi-button" ? MultiButtonForm : T extends "input" ? InputForm : T extends "dual-button" ? DualButtonForm : Form;
148150
declare class FormEvent {
149151
protected _form: Form | undefined;
150152
protected _name: string | undefined;
@@ -153,10 +155,7 @@ declare class FormEvent {
153155
protected _args: FormArguments;
154156
protected _eventArgs: Array<unknown>;
155157
constructor(hub: FormHub, eventAction: EventAction | undefined, args: FormArguments);
156-
loadForm(name: string): Form;
157-
loadForm(name: string, type: "multi-button"): MultiButtonForm;
158-
loadForm(name: string, type: "input"): InputForm;
159-
loadForm(name: string, type: "dual-button"): InputForm;
158+
loadForm<T extends FormType>(name: string, type?: T | undefined): LoadFormReturn<T>;
160159
set form(form: Form | undefined);
161160
get form(): Form | undefined;
162161
get name(): string | undefined;

0 commit comments

Comments
 (0)