mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-04-04 22:39:47 +00:00
chore: fix the values.
This commit is contained in:
@@ -98,8 +98,7 @@ export class Value<A extends ValueSpec> extends IBuilder<A> {
|
|||||||
static select<
|
static select<
|
||||||
A extends Description &
|
A extends Description &
|
||||||
Default<string> & {
|
Default<string> & {
|
||||||
values: readonly string[] | string[];
|
values: Record<string, string>;
|
||||||
valueNames: Record<string, string>;
|
|
||||||
}
|
}
|
||||||
>(a: A) {
|
>(a: A) {
|
||||||
return new Value({
|
return new Value({
|
||||||
@@ -130,20 +129,13 @@ export class Value<A extends ValueSpec> extends IBuilder<A> {
|
|||||||
static union<
|
static union<
|
||||||
A extends Description &
|
A extends Description &
|
||||||
Default<string> & {
|
Default<string> & {
|
||||||
tag: {
|
|
||||||
id: B;
|
|
||||||
name: string;
|
name: string;
|
||||||
description: string | null;
|
description: string | null;
|
||||||
warning: string | null;
|
warning: string | null;
|
||||||
variantNames: {
|
variants: Variants<{ [key: string]: { name: string, spec: InputSpec } }>;
|
||||||
[key: string]: string;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
variants: Variants<{ [key: string]: InputSpec }>;
|
|
||||||
displayAs: string | null;
|
displayAs: string | null;
|
||||||
uniqueBy: UniqueBy;
|
uniqueBy: UniqueBy;
|
||||||
},
|
}
|
||||||
B extends string
|
|
||||||
>(a: A) {
|
>(a: A) {
|
||||||
const { variants: previousVariants, ...rest } = a;
|
const { variants: previousVariants, ...rest } = a;
|
||||||
const variants = previousVariants.build() as BuilderExtract<A["variants"]>;
|
const variants = previousVariants.build() as BuilderExtract<A["variants"]>;
|
||||||
|
|||||||
Reference in New Issue
Block a user