This commit is contained in:
BluJ
2023-03-27 15:39:01 -06:00
parent 2607f05e63
commit ce0170b808
3 changed files with 10 additions and 18 deletions

View File

@@ -2,16 +2,8 @@ import * as matches from "ts-matches";
import { Parser } from "ts-matches";
import { InputSpec, ValueSpec as ValueSpecAny } from "../config/config-types";
const {
string,
some,
object,
dictionary,
unknown,
number,
literals,
boolean,
} = matches;
const { string, some, object, dictionary, unknown, number, literals, boolean } =
matches;
type TypeBoolean = "boolean";
type TypeString = "string";
@@ -166,13 +158,13 @@ export function matchNumberWithRange(range: string) {
leftValue === "*"
? (_) => true
: left === "["
? (x) => x >= Number(leftValue)
: (x) => x > Number(leftValue),
? (x) => x >= Number(leftValue)
: (x) => x > Number(leftValue),
leftValue === "*"
? "any"
: left === "["
? `greaterThanOrEqualTo${leftValue}`
: `greaterThan${leftValue}`
? `greaterThanOrEqualTo${leftValue}`
: `greaterThan${leftValue}`
)
.validate(
// prettier-ignore