fixes from testing

This commit is contained in:
Aiden McClelland
2024-02-08 13:30:32 -07:00
parent 4b1834a490
commit dc7a86a8e8
15 changed files with 92 additions and 56 deletions

View File

@@ -14,6 +14,7 @@ export type ValueType =
| "union"
export type ValueSpec = ValueSpecOf<ValueType>
/** core spec types. These types provide the metadata for performing validations */
// prettier-ignore
export type ValueSpecOf<T extends ValueType> = T extends "text"
? ValueSpecText
: T extends "textarea"
@@ -164,10 +165,10 @@ export type ListValueSpecType = "text" | "number" | "object"
export type ListValueSpecOf<T extends ListValueSpecType> = T extends "text"
? ListValueSpecText
: T extends "number"
? ListValueSpecNumber
: T extends "object"
? ListValueSpecObject
: never
? ListValueSpecNumber
: T extends "object"
? ListValueSpecObject
: never
/** represents a spec for a list */
export type ValueSpecList = ValueSpecListOf<ListValueSpecType>
export interface ValueSpecListOf<T extends ListValueSpecType>