@local901/validator 0.4.2 → 0.4.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.
Files changed (2) hide show
  1. package/index.d.ts +1 -1
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -19,7 +19,7 @@ export declare class v {
19
19
  static array<T>(item: Validator<T>, options?: ArrayValidatorOptions): Validator<T[]>;
20
20
  static enum<T extends EnumLike>(enumInstance: T): Validator<T[keyof T]>;
21
21
  static object<T extends object>(fields: FieldValidators<T>, options?: ObjectValidationOptions): Validator<T>;
22
- static record<T extends unknown, K = string | number | symbol>(field: Validator<T>, key?: Validator<K>): Validator<T>;
22
+ static record<T extends unknown, K extends string | number | symbol = string | number | symbol>(field: Validator<T>, key?: Validator<K>): Validator<Record<K, T>>;
23
23
  static record<T extends Record<string | number | symbol, unknown>>(field: RecordFieldValidator<T>, key?: RecordKeyValidator<T>): Validator<T>;
24
24
  static tuple<T extends ReadonlyArray<Validator>>(...validators: T): Validator<TupleValidatorTypes<T>>;
25
25
  static tuple<T extends ReadonlyArray<unknown>>(...validators: TupleValidators<T>): Validator<T>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@local901/validator",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "Type validator for javascript and typescript",
5
5
  "main": "index.js",
6
6
  "scripts": {