chore: incr version

This commit is contained in:
BluJ
2023-04-03 10:19:58 -06:00
parent 24e2f1c8dd
commit 510074530f
7 changed files with 68 additions and 22 deletions

View File

@@ -63,10 +63,16 @@ export class Config<A extends InputSpec> extends IBuilder<A> {
static empty() {
return new Config({});
}
static withValue<K extends string, B extends ValueSpec>(key: K, value: Value<B>) {
static withValue<K extends string, B extends ValueSpec>(
key: K,
value: Value<B>
) {
return Config.empty().withValue(key, value);
}
static addValue<K extends string, B extends ValueSpec>(key: K, value: Value<B>) {
static addValue<K extends string, B extends ValueSpec>(
key: K,
value: Value<B>
) {
return Config.empty().withValue(key, value);
}

View File

@@ -1,6 +1,12 @@
import { BuilderExtract, IBuilder } from "./builder";
import { Config } from "./config";
import { InputSpec, ListValueSpecNumber, ListValueSpecString, UniqueBy, ValueSpecList } from "../config-types";
import {
InputSpec,
ListValueSpecNumber,
ListValueSpecString,
UniqueBy,
ValueSpecList,
} from "../config-types";
import { guardAll } from "../../util";
/**
* Used as a subtype of Value.list

View File

@@ -80,7 +80,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);
}

View File

@@ -136,7 +136,7 @@ export function isValueSpecListOf<S extends ListValueSpecType>(
}
export interface ListValueSpecString {
type: 'string'
type: "string";
pattern: string | null;
patternDescription: string | null;
masked: boolean; // default = false
@@ -145,7 +145,7 @@ export interface ListValueSpecString {
}
export interface ListValueSpecNumber {
type: 'number';
type: "number";
/** '[0,1]' (inclusive) OR '[0,*)' (right unbounded), normal math rules */
range: string;
integral: boolean; // default = false
@@ -155,7 +155,7 @@ export interface ListValueSpecNumber {
}
export interface ListValueSpecObject {
type: 'object';
type: "object";
/** this is a mapped type of the config object at this level, replacing the object's values with specs on those values */
spec: InputSpec;
/** indicates whether duplicates can be permitted in the list */