@astral/validations 1.39.4 → 1.40.0

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.
package/esm/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare type RuleError = string | string[];
2
- export declare type ValidationResult = RuleError | undefined;
3
- export declare type InitializedRule = (value?: unknown) => ValidationResult;
4
- export declare type Rule<Params extends object, RequiredParams extends boolean> = RequiredParams extends true ? (params: Params) => InitializedRule : (params?: Params) => InitializedRule;
1
+ export type RuleError = string | string[];
2
+ export type ValidationResult = RuleError | undefined;
3
+ export type InitializedRule = (value?: unknown) => ValidationResult;
4
+ export type Rule<Params extends object, RequiredParams extends boolean> = RequiredParams extends true ? (params: Params) => InitializedRule : (params?: Params) => InitializedRule;
@@ -1,5 +1,5 @@
1
1
  import { InitializedRule } from '../types';
2
- declare type YupValidationResult = boolean | string | string[];
2
+ type YupValidationResult = boolean | string | string[];
3
3
  /**
4
4
  * @description Адаптирует правило созданное createRule к интерфейсу yup
5
5
  * @example yupAdapter(isMinLength(22))('word')
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "dependencies": {
6
6
  "lodash.isempty": "^4.4.0"
7
7
  },
8
- "version": "1.39.4",
8
+ "version": "1.40.0",
9
9
  "author": "Astral.Soft",
10
10
  "license": "MIT",
11
11
  "repository": {
package/types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export declare type RuleError = string | string[];
2
- export declare type ValidationResult = RuleError | undefined;
3
- export declare type InitializedRule = (value?: unknown) => ValidationResult;
4
- export declare type Rule<Params extends object, RequiredParams extends boolean> = RequiredParams extends true ? (params: Params) => InitializedRule : (params?: Params) => InitializedRule;
1
+ export type RuleError = string | string[];
2
+ export type ValidationResult = RuleError | undefined;
3
+ export type InitializedRule = (value?: unknown) => ValidationResult;
4
+ export type Rule<Params extends object, RequiredParams extends boolean> = RequiredParams extends true ? (params: Params) => InitializedRule : (params?: Params) => InitializedRule;
@@ -1,5 +1,5 @@
1
1
  import { InitializedRule } from '../types';
2
- declare type YupValidationResult = boolean | string | string[];
2
+ type YupValidationResult = boolean | string | string[];
3
3
  /**
4
4
  * @description Адаптирует правило созданное createRule к интерфейсу yup
5
5
  * @example yupAdapter(isMinLength(22))('word')