mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-03-30 20:24:47 +00:00
chore: Update
This commit is contained in:
@@ -1,6 +1,12 @@
|
|||||||
import { BuilderExtract, IBuilder } from "./builder";
|
import { BuilderExtract, IBuilder } from "./builder";
|
||||||
import { Config } from "./config";
|
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";
|
import { guardAll } from "../../util";
|
||||||
/**
|
/**
|
||||||
* Used as a subtype of Value.list
|
* Used as a subtype of Value.list
|
||||||
|
|||||||
@@ -111,7 +111,8 @@ export type ListValueSpecOf<T extends ListValueSpecType> = T extends "string"
|
|||||||
|
|
||||||
/** represents a spec for a list */
|
/** represents a spec for a list */
|
||||||
export type ValueSpecList = ValueSpecListOf<ListValueSpecType>;
|
export type ValueSpecList = ValueSpecListOf<ListValueSpecType>;
|
||||||
export interface ValueSpecListOf<T extends ListValueSpecType> extends WithStandalone {
|
export interface ValueSpecListOf<T extends ListValueSpecType>
|
||||||
|
extends WithStandalone {
|
||||||
type: "list";
|
type: "list";
|
||||||
spec: ListValueSpecOf<T>;
|
spec: ListValueSpecOf<T>;
|
||||||
range: string; // '[0,1]' (inclusive) OR '[0,*)' (right unbounded), normal math rules
|
range: string; // '[0,1]' (inclusive) OR '[0,*)' (right unbounded), normal math rules
|
||||||
@@ -127,7 +128,10 @@ export interface ValueSpecListOf<T extends ListValueSpecType> extends WithStanda
|
|||||||
}
|
}
|
||||||
|
|
||||||
// sometimes the type checker needs just a little bit of help
|
// sometimes the type checker needs just a little bit of help
|
||||||
export function isValueSpecListOf<S extends ListValueSpecType>(t: ValueSpecList, s: S): t is ValueSpecListOf<S> {
|
export function isValueSpecListOf<S extends ListValueSpecType>(
|
||||||
|
t: ValueSpecList,
|
||||||
|
s: S
|
||||||
|
): t is ValueSpecListOf<S> {
|
||||||
return t.spec.type === s;
|
return t.spec.type === s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "start-sdk",
|
"name": "start-sdk",
|
||||||
"version": "0.4.0-lib0.beta7",
|
"version": "0.4.0-lib0.beta8",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "start-sdk",
|
"name": "start-sdk",
|
||||||
"version": "0.4.0-lib0.beta7",
|
"version": "0.4.0-lib0.beta8",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@iarna/toml": "^2.2.5",
|
"@iarna/toml": "^2.2.5",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "start-sdk",
|
"name": "start-sdk",
|
||||||
"version": "0.4.0-lib0.beta7",
|
"version": "0.4.0-lib0.beta8",
|
||||||
"description": "For making the patterns that are wanted in making services for the startOS.",
|
"description": "For making the patterns that are wanted in making services for the startOS.",
|
||||||
"main": "./lib/index.js",
|
"main": "./lib/index.js",
|
||||||
"types": "./lib/index.d.ts",
|
"types": "./lib/index.d.ts",
|
||||||
|
|||||||
Reference in New Issue
Block a user