updated config files and starting work on utils lib
This commit is contained in:
parent
8e218cb802
commit
25d9f2dd85
20 changed files with 900 additions and 9 deletions
|
|
@ -1,5 +1,4 @@
|
|||
import { z } from 'zod';
|
||||
import { ConfigValidationError } from '../errors';
|
||||
|
||||
export interface ValidationResult {
|
||||
valid: boolean;
|
||||
|
|
@ -58,7 +57,7 @@ export function checkDeprecations(
|
|||
if (pathStr in deprecations) {
|
||||
warnings?.push({
|
||||
path: pathStr,
|
||||
message: deprecations[pathStr],
|
||||
message: deprecations[pathStr]!,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -183,10 +182,10 @@ export function mergeSchemas<T extends z.ZodSchema[]>(
|
|||
throw new Error('At least two schemas required for merge');
|
||||
}
|
||||
|
||||
let result = schemas[0].and(schemas[1]);
|
||||
let result = schemas[0]!.and(schemas[1]!);
|
||||
|
||||
for (let i = 2; i < schemas.length; i++) {
|
||||
result = result.and(schemas[i]) as any;
|
||||
result = result.and(schemas[i]!) as any;
|
||||
}
|
||||
|
||||
return result as any;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue