chore: Remove the satisfies from the non released versions.

This commit is contained in:
BluJ
2023-05-12 14:50:28 -06:00
parent 5033df197c
commit 3df957898a
4 changed files with 34 additions and 30 deletions

View File

@@ -13,7 +13,10 @@ export function setupActions<Store, Vault>(
}
return actions
})
return {
const answer: {
actions: ExpectedExports.actions
actionsMetadata: ExpectedExports.actionsMetadata
} = {
get actions() {
return myActions()
},
@@ -23,8 +26,6 @@ export function setupActions<Store, Vault>(
createdActions.map((x) => x.ActionMetadata({ effects, utils })),
)
},
} satisfies {
actions: ExpectedExports.actions
actionsMetadata: ExpectedExports.actionsMetadata
}
return answer
}

View File

@@ -20,7 +20,10 @@ export function setupBackups<M extends SDKManifest>(
}
}
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<M extends SDKManifest>(
}
}) as ExpectedExports.restoreBackup
},
} satisfies {
createBackup: ExpectedExports.createBackup
restoreBackup: ExpectedExports.restoreBackup
}
return answer
}

View File

@@ -60,7 +60,7 @@ export class List<Type, Store, Vault> {
generate: null,
...aSpec,
}
return {
const built: ValueSpecListOf<"text"> = {
description: null,
warning: null,
default: [],
@@ -70,7 +70,8 @@ export class List<Type, Store, Vault> {
disabled: false,
...a,
spec,
} satisfies ValueSpecListOf<"text">
}
return built
}, arrayOf(string))
}
static dynamicText<Store = never, Vault = never>(
@@ -112,7 +113,7 @@ export class List<Type, Store, Vault> {
generate: null,
...aSpec,
}
return {
const built: ValueSpecListOf<"text"> = {
description: null,
warning: null,
default: [],
@@ -122,7 +123,8 @@ export class List<Type, Store, Vault> {
disabled: false,
...a,
spec,
} satisfies ValueSpecListOf<"text">
}
return built
}, arrayOf(string))
}
static number(
@@ -154,7 +156,7 @@ export class List<Type, Store, Vault> {
units: null,
...aSpec,
}
return {
const built: ValueSpecListOf<"number"> = {
description: null,
warning: null,
minLength: null,
@@ -164,7 +166,8 @@ export class List<Type, Store, Vault> {
disabled: false,
...a,
spec,
} satisfies ValueSpecListOf<"number">
}
return built
}, arrayOf(number))
}
static dynamicNumber<Store = never, Vault = never>(

View File

@@ -242,22 +242,21 @@ export class Value<Type, Store, Vault> {
immutable?: boolean
generate?: null | RandomString
}) {
return new Value<string, never, never>(
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<string, never, never>(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<Store = never, Vault = never>(
getA: LazyBuild<