@aeriajs/validation 0.0.77 → 0.0.79

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,7 +9,7 @@ export type ValidateOptions = {
9
9
  };
10
10
  export declare const makeValidationError: <TValidationError extends ValidationError>(error: TValidationError) => TValidationError;
11
11
  export declare const validateProperty: <TWhat>(propName: string, what: TWhat, property: Property | undefined, options?: ValidateOptions) => Result.Either<PropertyValidationError | ValidationError, unknown>;
12
- export declare const validateWholeness: (what: Record<string, any>, schema: Omit<JsonSchema, '$id'>) => {
12
+ export declare const validateWholeness: (what: Record<string, any>, schema: Omit<JsonSchema, "$id">) => {
13
13
  code: ValidationErrorCode.MissingProperties;
14
14
  errors: {
15
15
  [k: string]: {
@@ -17,7 +17,7 @@ export declare const validateWholeness: (what: Record<string, any>, schema: Omit
17
17
  };
18
18
  };
19
19
  } | undefined;
20
- export declare const validate: <TWhat, const TJsonSchema extends Property | Omit<Description, "$id">>(what: TWhat | undefined, schema: TJsonSchema, options?: ValidateOptions) => {
20
+ export declare const validate: <TWhat, const TJsonSchema extends Omit<Description, "$id"> | Property>(what: TWhat | undefined, schema: TJsonSchema, options?: ValidateOptions) => {
21
21
  readonly _tag: "Error";
22
22
  readonly error: PropertyValidationError | ValidationError;
23
23
  readonly result: undefined;
@@ -26,7 +26,7 @@ export declare const validate: <TWhat, const TJsonSchema extends Property | Omit
26
26
  readonly error: undefined;
27
27
  readonly result: InferSchema<TJsonSchema>;
28
28
  };
29
- export declare const validator: <const TJsonSchema extends Property | Omit<Description, "$id">>(schema: TJsonSchema, options?: ValidateOptions) => readonly [InferSchema<TJsonSchema>, <TWhat>(what: TWhat) => {
29
+ export declare const validator: <const TJsonSchema extends Omit<Description, "$id"> | Property>(schema: TJsonSchema, options?: ValidateOptions) => readonly [InferSchema<TJsonSchema>, <TWhat>(what: TWhat) => {
30
30
  readonly _tag: "Error";
31
31
  readonly error: PropertyValidationError | ValidationError;
32
32
  readonly result: undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeriajs/validation",
3
- "version": "0.0.77",
3
+ "version": "0.0.79",
4
4
  "description": "## Installation",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -26,8 +26,8 @@
26
26
  "@aeriajs/types": "link:../types"
27
27
  },
28
28
  "peerDependencies": {
29
- "@aeriajs/common": "^0.0.74",
30
- "@aeriajs/types": "^0.0.64"
29
+ "@aeriajs/common": "^0.0.76",
30
+ "@aeriajs/types": "^0.0.66"
31
31
  },
32
32
  "scripts": {
33
33
  "test": "env TS_NODE_COMPILER_OPTIONS=\"$(cat ../compilerOptions.json)\" mocha -r ts-node/register tests/*.spec.ts",