@opinio-dev/models 1.1.1-item-types.2 → 1.1.1-item-types.3

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.
@@ -3,8 +3,8 @@ export interface IValidator<T> {
3
3
  /**
4
4
  * Validates a passed item against pre-defined rules.
5
5
  * @param {Partial<T>} item The item to validate.
6
- * @param {Array<keyof T>} ignoredFields Fields to ignore during validation.
6
+ * @param {Array<keyof T>=} ignoredFields Fields to ignore during validation.
7
7
  * @returns {IValidationResult} The result of the validation.
8
8
  */
9
- validate(item: Partial<T>, ignoredFields: Array<keyof T>): IValidationResult;
9
+ validate(item: Partial<T>, ignoredFields?: Array<keyof T>): IValidationResult;
10
10
  }
@@ -16,8 +16,8 @@ export declare class ValidatorRegistry<T> {
16
16
  * Validates an item using a registered validator.
17
17
  * @param {string} key The key of the validator to use.
18
18
  * @param {Partial<T>} item The item to validate.
19
- * @param {Array<keyof T>} ignoredFields Fields to ignore during validation.
19
+ * @param {Array<keyof T>=} ignoredFields Fields to ignore during validation.
20
20
  * @returns {IValidationResult} The result of the validation.
21
21
  */
22
- validate(key: string, item: Partial<T>, ignoredFields: Array<keyof T>): IValidationResult;
22
+ validate(key: string, item: Partial<T>, ignoredFields?: Array<keyof T>): IValidationResult;
23
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opinio-dev/models",
3
- "version": "1.1.1-item-types.2",
3
+ "version": "1.1.1-item-types.3",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"