mirror of
https://github.com/Start9Labs/start-sdk.git
synced 2026-04-02 05:23:21 +00:00
chore: charlie 20
This commit is contained in:
@@ -2,34 +2,38 @@ import * as C from "./configTypesRaw";
|
||||
|
||||
export type ValueType = C.ValueType;
|
||||
|
||||
export type InputSpec = Record<string, Required<C.ValueSpec>>;
|
||||
export type RequiredDeep<A> = A extends {}
|
||||
? { [K in keyof A]-?: RequiredDeep<A[K]> }
|
||||
: Required<A>;
|
||||
|
||||
export type ValueSpec = Required<C.ValueSpec>;
|
||||
export type InputSpec = Record<string, RequiredDeep<C.ValueSpec>>;
|
||||
|
||||
export type ValueSpec = RequiredDeep<C.ValueSpec>;
|
||||
|
||||
/** core spec types. These types provide the metadata for performing validations */
|
||||
export type ValueSpecOf<T extends ValueType> = Required<C.ValueSpecOf<T>>;
|
||||
export type ValueSpecOf<T extends ValueType> = RequiredDeep<C.ValueSpecOf<T>>;
|
||||
|
||||
export type ValueSpecString = Required<C.ValueSpecString>;
|
||||
export type ValueSpecTextarea = Required<C.ValueSpecTextarea>;
|
||||
export type ValueSpecNumber = Required<C.ValueSpecNumber>;
|
||||
export type ValueSpecSelect = Required<C.ValueSpecSelect>;
|
||||
export type ValueSpecMultiselect = Required<C.ValueSpecMultiselect>;
|
||||
export type ValueSpecBoolean = Required<C.ValueSpecBoolean>;
|
||||
export type ValueSpecUnion = Required<C.ValueSpecUnion>;
|
||||
export type ValueSpecFile = Required<C.ValueSpecFile>;
|
||||
export type ValueSpecObject = Required<C.ValueSpecObject>;
|
||||
export type WithStandalone = Required<C.WithStandalone>;
|
||||
export type SelectBase = Required<C.SelectBase>;
|
||||
export type ListValueSpecType = Required<C.ListValueSpecType>;
|
||||
export type ValueSpecString = RequiredDeep<C.ValueSpecString>;
|
||||
export type ValueSpecTextarea = RequiredDeep<C.ValueSpecTextarea>;
|
||||
export type ValueSpecNumber = RequiredDeep<C.ValueSpecNumber>;
|
||||
export type ValueSpecSelect = RequiredDeep<C.ValueSpecSelect>;
|
||||
export type ValueSpecMultiselect = RequiredDeep<C.ValueSpecMultiselect>;
|
||||
export type ValueSpecBoolean = RequiredDeep<C.ValueSpecBoolean>;
|
||||
export type ValueSpecUnion = RequiredDeep<C.ValueSpecUnion>;
|
||||
export type ValueSpecFile = RequiredDeep<C.ValueSpecFile>;
|
||||
export type ValueSpecObject = RequiredDeep<C.ValueSpecObject>;
|
||||
export type WithStandalone = RequiredDeep<C.WithStandalone>;
|
||||
export type SelectBase = RequiredDeep<C.SelectBase>;
|
||||
export type ListValueSpecType = RequiredDeep<C.ListValueSpecType>;
|
||||
|
||||
/** represents a spec for the values of a list */
|
||||
export type ListValueSpecOf<T extends ListValueSpecType> = Required<
|
||||
export type ListValueSpecOf<T extends ListValueSpecType> = RequiredDeep<
|
||||
C.ListValueSpecOf<T>
|
||||
>;
|
||||
|
||||
/** represents a spec for a list */
|
||||
export type ValueSpecList = Required<C.ValueSpecList>;
|
||||
export type ValueSpecListOf<T extends ListValueSpecType> = Required<
|
||||
export type ValueSpecList = RequiredDeep<C.ValueSpecList>;
|
||||
export type ValueSpecListOf<T extends ListValueSpecType> = RequiredDeep<
|
||||
C.ValueSpecListOf<T>
|
||||
>;
|
||||
|
||||
@@ -40,11 +44,11 @@ export function isValueSpecListOf<S extends ListValueSpecType>(
|
||||
): t is ValueSpecListOf<S> & { spec: ListValueSpecOf<S> } {
|
||||
return t.spec.type === s;
|
||||
}
|
||||
export type ListValueSpecString = Required<C.ListValueSpecString>;
|
||||
export type ListValueSpecNumber = Required<C.ListValueSpecNumber>;
|
||||
export type ListValueSpecObject = Required<C.ListValueSpecObject>;
|
||||
export type UniqueBy = Required<C.UniqueBy>;
|
||||
export type DefaultString = Required<C.DefaultString>;
|
||||
export type ListValueSpecString = RequiredDeep<C.ListValueSpecString>;
|
||||
export type ListValueSpecNumber = RequiredDeep<C.ListValueSpecNumber>;
|
||||
export type ListValueSpecObject = RequiredDeep<C.ListValueSpecObject>;
|
||||
export type UniqueBy = RequiredDeep<C.UniqueBy>;
|
||||
export type DefaultString = RequiredDeep<C.DefaultString>;
|
||||
|
||||
export const unionSelectKey = "unionSelectKey" as const;
|
||||
export type UnionSelectKey = typeof unionSelectKey;
|
||||
|
||||
Reference in New Issue
Block a user