diff --git a/lib/actions/setupActions.ts b/lib/actions/setupActions.ts index 4f3264d..b763f9c 100644 --- a/lib/actions/setupActions.ts +++ b/lib/actions/setupActions.ts @@ -13,7 +13,10 @@ export function setupActions( } return actions }) - return { + const answer: { + actions: ExpectedExports.actions + actionsMetadata: ExpectedExports.actionsMetadata + } = { get actions() { return myActions() }, @@ -23,8 +26,6 @@ export function setupActions( createdActions.map((x) => x.ActionMetadata({ effects, utils })), ) }, - } satisfies { - actions: ExpectedExports.actions - actionsMetadata: ExpectedExports.actionsMetadata } + return answer } diff --git a/lib/backup/setupBackups.ts b/lib/backup/setupBackups.ts index de3106a..e5d21ed 100644 --- a/lib/backup/setupBackups.ts +++ b/lib/backup/setupBackups.ts @@ -20,7 +20,10 @@ export function setupBackups( } } backups.push(Backups.volumes(...volumes)) - return { + const answer: { + createBackup: ExpectedExports.createBackup + restoreBackup: ExpectedExports.restoreBackup + } = { get createBackup() { return (async (options) => { for (const backup of backups) { @@ -35,8 +38,6 @@ export function setupBackups( } }) as ExpectedExports.restoreBackup }, - } satisfies { - createBackup: ExpectedExports.createBackup - restoreBackup: ExpectedExports.restoreBackup } + return answer } diff --git a/lib/config/builder/list.ts b/lib/config/builder/list.ts index e31e623..c25f9b6 100644 --- a/lib/config/builder/list.ts +++ b/lib/config/builder/list.ts @@ -60,7 +60,7 @@ export class List { generate: null, ...aSpec, } - return { + const built: ValueSpecListOf<"text"> = { description: null, warning: null, default: [], @@ -70,7 +70,8 @@ export class List { disabled: false, ...a, spec, - } satisfies ValueSpecListOf<"text"> + } + return built }, arrayOf(string)) } static dynamicText( @@ -112,7 +113,7 @@ export class List { generate: null, ...aSpec, } - return { + const built: ValueSpecListOf<"text"> = { description: null, warning: null, default: [], @@ -122,7 +123,8 @@ export class List { disabled: false, ...a, spec, - } satisfies ValueSpecListOf<"text"> + } + return built }, arrayOf(string)) } static number( @@ -154,7 +156,7 @@ export class List { units: null, ...aSpec, } - return { + const built: ValueSpecListOf<"number"> = { description: null, warning: null, minLength: null, @@ -164,7 +166,8 @@ export class List { disabled: false, ...a, spec, - } satisfies ValueSpecListOf<"number"> + } + return built }, arrayOf(number)) } static dynamicNumber( diff --git a/lib/config/builder/value.ts b/lib/config/builder/value.ts index 7a2bf16..953eee2 100644 --- a/lib/config/builder/value.ts +++ b/lib/config/builder/value.ts @@ -242,22 +242,21 @@ export class Value { immutable?: boolean generate?: null | RandomString }) { - return new Value( - async () => - ({ - description: null, - warning: null, - minLength: null, - maxLength: null, - placeholder: null, - type: "textarea" as const, - disabled: false, - immutable: a.immutable ?? false, - generate: a.generate ?? null, - ...a, - } satisfies ValueSpecTextarea), - string, - ) + return new Value(async () => { + const built: ValueSpecTextarea = { + description: null, + warning: null, + minLength: null, + maxLength: null, + placeholder: null, + type: "textarea" as const, + disabled: false, + immutable: a.immutable ?? false, + generate: a.generate ?? null, + ...a, + } + return built + }, string) } static dynamicTextarea( getA: LazyBuild<