mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-30 12:21:57 +00:00
chore: prettier."
This commit is contained in:
@@ -1,6 +1,12 @@
|
||||
import { BuilderExtract, IBuilder } from "./builder";
|
||||
import { Config } from "./config";
|
||||
import { InputSpec, ListValueSpecString, UniqueBy, ValueSpecList } from "../config-types";
|
||||
import {
|
||||
InputSpec,
|
||||
ListValueSpecNumber,
|
||||
ListValueSpecString,
|
||||
UniqueBy,
|
||||
ValueSpecList,
|
||||
} from "../config-types";
|
||||
import { guardAll } from "../../util";
|
||||
|
||||
export class List<A extends ValueSpecList> extends IBuilder<A> {
|
||||
|
||||
@@ -36,7 +36,12 @@ import { DefaultString } from "../config-types";
|
||||
```
|
||||
*/
|
||||
export class Value<A extends ValueSpec> extends IBuilder<A> {
|
||||
static boolean(a: { name: string; description?: string | null; warning?: string | null; default?: boolean | null }) {
|
||||
static boolean(a: {
|
||||
name: string;
|
||||
description?: string | null;
|
||||
warning?: string | null;
|
||||
default?: boolean | null;
|
||||
}) {
|
||||
return new Value({
|
||||
description: null,
|
||||
warning: null,
|
||||
@@ -162,7 +167,9 @@ export class Value<A extends ValueSpec> extends IBuilder<A> {
|
||||
spec,
|
||||
});
|
||||
}
|
||||
static union<V extends Variants<{ [key: string]: { name: string; spec: InputSpec } }>>(
|
||||
static union<
|
||||
V extends Variants<{ [key: string]: { name: string; spec: InputSpec } }>
|
||||
>(
|
||||
a: {
|
||||
name: string;
|
||||
description?: string | null;
|
||||
|
||||
@@ -67,7 +67,10 @@ export class Variants<
|
||||
static empty() {
|
||||
return Variants.of({});
|
||||
}
|
||||
static withVariant<K extends string, B extends InputSpec>(key: K, value: Config<B>) {
|
||||
static withVariant<K extends string, B extends InputSpec>(
|
||||
key: K,
|
||||
value: Config<B>
|
||||
) {
|
||||
return Variants.empty().withVariant(key, value);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user