feat: New utils of createOrUpdateVault

This commit is contained in:
BluJ
2023-05-04 15:59:25 -06:00
parent 50bcad0300
commit 22042d7e96
4 changed files with 146 additions and 9 deletions

View File

@@ -208,15 +208,13 @@ export type UniqueBy =
| {
all: readonly UniqueBy[] | UniqueBy[]
}
export type DefaultString =
| string
| {
charset: string
len: number
}
export type DefaultString = string | RandomString
export type RandomString = {
charset: string
len: number
}
// sometimes the type checker needs just a little bit of help
export function isValueSpecListOf<S extends ListValueSpecType>(
function isValueSpecListOf<S extends ListValueSpecType>(
t: ValueSpec,
s: S,
): t is ValueSpecListOf<S> & { spec: ListValueSpecOf<S> } {