umt 3.0.0 → 3.1.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.
Files changed (51) hide show
  1. package/module/Date/getDay.d.ts +1 -2
  2. package/module/Object/keyBy.d.ts +3 -4
  3. package/module/Validate/array/arrayOf.d.ts +2 -3
  4. package/module/Validate/array/arrayOf.js.map +1 -1
  5. package/module/Validate/function/core.d.ts +9 -10
  6. package/module/Validate/function/core.js.map +1 -1
  7. package/module/Validate/instanceof/core.d.ts +1 -2
  8. package/module/Validate/map/core.d.ts +2 -3
  9. package/module/Validate/map/core.js.map +1 -1
  10. package/module/Validate/object/intersection.d.ts +3 -4
  11. package/module/Validate/object/intersection.js.map +1 -1
  12. package/module/Validate/object/nullable.d.ts +1 -2
  13. package/module/Validate/object/optional.d.ts +1 -2
  14. package/module/Validate/object/partial.d.ts +1 -2
  15. package/module/Validate/object/required.d.ts +2 -3
  16. package/module/Validate/object/union.d.ts +2 -3
  17. package/module/Validate/object/union.js.map +1 -1
  18. package/module/Validate/set/core.d.ts +2 -3
  19. package/module/Validate/set/core.js.map +1 -1
  20. package/module/Validate/templateLiteral/core.d.ts +5 -6
  21. package/module/Validate/templateLiteral/core.js.map +1 -1
  22. package/module/es5/Date/getDay.d.ts +1 -2
  23. package/module/es5/Object/keyBy.d.ts +3 -4
  24. package/module/es5/Validate/array/arrayOf.d.ts +2 -3
  25. package/module/es5/Validate/function/core.d.ts +9 -10
  26. package/module/es5/Validate/function/core.js +0 -2
  27. package/module/es5/Validate/instanceof/core.d.ts +1 -2
  28. package/module/es5/Validate/map/core.d.ts +2 -3
  29. package/module/es5/Validate/object/intersection.d.ts +3 -4
  30. package/module/es5/Validate/object/nullable.d.ts +1 -2
  31. package/module/es5/Validate/object/optional.d.ts +1 -2
  32. package/module/es5/Validate/object/partial.d.ts +1 -2
  33. package/module/es5/Validate/object/required.d.ts +2 -3
  34. package/module/es5/Validate/object/union.d.ts +2 -3
  35. package/module/es5/Validate/set/core.d.ts +2 -3
  36. package/module/es5/Validate/templateLiteral/core.d.ts +5 -6
  37. package/module/es5/types/array/chunk.d.ts +1 -2
  38. package/module/es5/types/array/zip.d.ts +4 -2
  39. package/module/es5/types/logic/binary1bitNor.d.ts +1 -2
  40. package/module/es5/types/logic/binaryFullAdder.d.ts +1 -2
  41. package/module/es5/types/math/divide.d.ts +1 -2
  42. package/module/es5/types/math/multiply.d.ts +1 -2
  43. package/module/es5/types/object/pickDeep.d.ts +3 -4
  44. package/module/types/array/chunk.d.ts +1 -2
  45. package/module/types/array/zip.d.ts +4 -2
  46. package/module/types/logic/binary1bitNor.d.ts +1 -2
  47. package/module/types/logic/binaryFullAdder.d.ts +1 -2
  48. package/module/types/math/divide.d.ts +1 -2
  49. package/module/types/math/multiply.d.ts +1 -2
  50. package/module/types/object/pickDeep.d.ts +3 -4
  51. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import type { ArrayToUnion } from "../types/logic/arrayToUnion";
2
- interface DayList {
2
+ export interface DayList {
3
3
  de: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"];
4
4
  ko: ["일", "월", "화", "수", "목", "금", "토"];
5
5
  en: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
@@ -17,4 +17,3 @@ interface DayList {
17
17
  * getDay(1, "fr"); // Returns "Lun"
18
18
  */
19
19
  export declare const getDay: <T extends keyof DayList>(day: number, lang?: T) => ArrayToUnion<DayList[T]>;
20
- export {};
@@ -1,6 +1,6 @@
1
- type PropertyName = string | number | symbol;
2
- type IterateeFunction<T> = (value: T) => PropertyName;
3
- type Iteratee<T> = IterateeFunction<T> | keyof T;
1
+ export type PropertyName = string | number | symbol;
2
+ export type IterateeFunction<T> = (value: T) => PropertyName;
3
+ export type Iteratee<T> = IterateeFunction<T> | keyof T;
4
4
  /**
5
5
  * Creates an object composed of keys generated from the results of running each element of collection through iteratee
6
6
  * @param collection The collection to iterate over
@@ -17,4 +17,3 @@ type Iteratee<T> = IterateeFunction<T> | keyof T;
17
17
  * - `removePrototypeMapDeep` — recursive sanitization of an array of objects (for deeply nested data)
18
18
  */
19
19
  export declare function keyBy<T>(collection: T[] | Record<PropertyName, T>, iteratee?: Iteratee<T>): Record<PropertyName, T>;
20
- export {};
@@ -1,5 +1,5 @@
1
1
  import type { ValidateCoreReturnType, ValidateType } from "../../Validate/type";
2
- type ExtractValidatedType<V> = V extends (value: never) => {
2
+ export type ArrayOfExtractValidatedType<V> = V extends (value: never) => {
3
3
  type: infer T;
4
4
  } ? ValidateType<T> : never;
5
5
  /**
@@ -13,5 +13,4 @@ export declare const arrayOf: <V extends (value: never) => {
13
13
  type: unknown;
14
14
  message: string;
15
15
  validate: boolean;
16
- }>(validator: V, message?: string) => (values: ExtractValidatedType<V>[]) => ValidateCoreReturnType<ExtractValidatedType<V>[]>;
17
- export {};
16
+ }>(validator: V, message?: string) => (values: ArrayOfExtractValidatedType<V>[]) => ValidateCoreReturnType<ArrayOfExtractValidatedType<V>[]>;
@@ -1 +1 @@
1
- {"version":3,"file":"arrayOf.js","sourceRoot":"","sources":["../../../src/Validate/array/arrayOf.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAY7C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAOrB,SAAY,EACZ,OAAgB,EAChB,EAAE;IAEF,OAAO,CAAC,MAAiB,EAAqC,EAAE;QAC9D,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YACrB,OAAO;gBACL,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE,OAAO,IAAI,EAAE;gBACtB,IAAI,EAAE,MAAM;aACb,CAAC;QACJ,CAAC;QACD,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,MAAM,MAAM,GACV,SAID,CAAC,KAAK,CAAC,CAAC;YACT,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;gBACrB,OAAO;oBACL,QAAQ,EAAE,KAAK;oBACf,OAAO,EAAE,MAAM,CAAC,OAAO;oBACvB,IAAI,EAAE,MAAM;iBACb,CAAC;YACJ,CAAC;QACH,CAAC;QACD,OAAO;YACL,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE;YACX,IAAI,EAAE,MAAM;SACb,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"arrayOf.js","sourceRoot":"","sources":["../../../src/Validate/array/arrayOf.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAc7C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,CAOrB,SAAY,EACZ,OAAgB,EAChB,EAAE;IAEF,OAAO,CAAC,MAAiB,EAAqC,EAAE;QAC9D,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;YACrB,OAAO;gBACL,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE,OAAO,IAAI,EAAE;gBACtB,IAAI,EAAE,MAAM;aACb,CAAC;QACJ,CAAC;QACD,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;YAC3B,MAAM,MAAM,GACV,SAID,CAAC,KAAK,CAAC,CAAC;YACT,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;gBACrB,OAAO;oBACL,QAAQ,EAAE,KAAK;oBACf,OAAO,EAAE,MAAM,CAAC,OAAO;oBACvB,IAAI,EAAE,MAAM;iBACb,CAAC;YACJ,CAAC;QACH,CAAC;QACD,OAAO;YACL,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE;YACX,IAAI,EAAE,MAAM;SACb,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -11,27 +11,27 @@
11
11
  * the schema on every call.
12
12
  */
13
13
  import type { ValidateCoreReturnType, ValidateType } from "../../Validate/type";
14
- type AnyValidator = (value: any) => ValidateCoreReturnType<unknown>;
15
- type ExtractValidatedType<V> = V extends (value: never) => {
14
+ export type FunctionAnyValidator = (value: any) => ValidateCoreReturnType<unknown>;
15
+ export type FunctionExtractValidatedType<V> = V extends (value: never) => {
16
16
  type: infer T;
17
17
  } ? ValidateType<T> : never;
18
- type InferInputs<Inputs> = Inputs extends readonly AnyValidator[] ? {
19
- [K in keyof Inputs]: ExtractValidatedType<Inputs[K]>;
18
+ export type InferInputs<Inputs> = Inputs extends readonly FunctionAnyValidator[] ? {
19
+ [K in keyof Inputs]: FunctionExtractValidatedType<Inputs[K]>;
20
20
  } : any[];
21
- type InferOutput<Output> = Output extends AnyValidator ? ExtractValidatedType<Output> : any;
21
+ export type InferOutput<Output> = Output extends FunctionAnyValidator ? FunctionExtractValidatedType<Output> : any;
22
22
  /**
23
23
  * Function schema definition. `input` describes positional parameters and
24
24
  * `output` describes the return type. Both are optional; when omitted the
25
25
  * validator only enforces that the value is callable.
26
26
  */
27
27
  export interface FunctionSchema {
28
- input?: readonly AnyValidator[];
29
- output?: AnyValidator;
28
+ input?: readonly FunctionAnyValidator[];
29
+ output?: FunctionAnyValidator;
30
30
  }
31
- type ExtractInput<S> = S extends {
31
+ export type ExtractInput<S> = S extends {
32
32
  input: infer I;
33
33
  } ? I : undefined;
34
- type ExtractOutput<S> = S extends {
34
+ export type ExtractOutput<S> = S extends {
35
35
  output: infer O;
36
36
  } ? O : undefined;
37
37
  /**
@@ -72,4 +72,3 @@ export interface FunctionValidator<Inputs, Output> {
72
72
  * @returns {FunctionValidator} - Validator augmented with `implement()`
73
73
  */
74
74
  export declare const function_: <const S extends FunctionSchema = FunctionSchema>(schema?: S, message?: string) => FunctionValidator<ExtractInput<S>, ExtractOutput<S>>;
75
- export {};
@@ -1 +1 @@
1
- {"version":3,"file":"core.js","sourceRoot":"","sources":["../../../src/Validate/function/core.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAqEH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,SAA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,MAAM,CAAC,OAAO,EAAE,EAAE,CAAC;oBACvD,MAAM,MAAM,GAAG,cAAc,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;oBACjD,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;wBACrB,MAAM,IAAI,SAAS,CACjB,MAAM,CAAC,OAAO;4BACZ,2BAA2B,KAAK,oBAAoB,CACvD,CAAC;oBACJ,CAAC;gBACH,CAAC;YACH,CAAC;YACD,MAAM,WAAW,GACf,UACD,CAAC,GAAI,UAAmC,CAAC,CAAC;YAC3C,IAAI,MAAM,EAAE,CAAC;gBACX,MAAM,MAAM,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC;gBACnC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;oBACrB,MAAM,IAAI,SAAS,CACjB,MAAM,CAAC,OAAO,IAAI,mCAAmC,CACtD,CAAC;gBACJ,CAAC;YACH,CAAC;YACD,OAAO,WAAkC,CAAC;QAC5C,CAAC,CAAC;QACF,OAAO,OAAO,CAAC;IACjB,CAAC,CAAC;IAEF,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC"}
@@ -5,7 +5,7 @@
5
5
  * `instanceof_` because `instanceof` is a reserved keyword in JavaScript.
6
6
  */
7
7
  import type { ValidateCoreReturnType } from "../../Validate/type";
8
- type Constructor<T> = new (...arguments_: any[]) => T;
8
+ export type Constructor<T> = new (...arguments_: any[]) => T;
9
9
  /**
10
10
  * Creates a validator that checks whether a value is an instance of the given
11
11
  * constructor. Subclasses of the constructor satisfy the validator, matching
@@ -16,4 +16,3 @@ type Constructor<T> = new (...arguments_: any[]) => T;
16
16
  * @returns {Function} - Validator function for instances of the constructor
17
17
  */
18
18
  export declare const instanceof_: <T>(classConstructor: Constructor<T>, message?: string) => (value: T) => ValidateCoreReturnType<T>;
19
- export {};
@@ -5,7 +5,7 @@
5
5
  * `arrayOf()` validates each element of an array.
6
6
  */
7
7
  import type { ValidateCoreReturnType, ValidateType } from "../../Validate/type";
8
- type ExtractValidatedType<V> = V extends (value: never) => {
8
+ export type MapExtractValidatedType<V> = V extends (value: never) => {
9
9
  type: infer T;
10
10
  } ? ValidateType<T> : never;
11
11
  /**
@@ -20,5 +20,4 @@ type ExtractValidatedType<V> = V extends (value: never) => {
20
20
  * @param {string} [message] - Custom error message for type validation
21
21
  * @returns {Function} - Validator function for Map instances
22
22
  */
23
- export declare const map: <KV extends (value: any) => ValidateCoreReturnType<unknown> = (value: unknown) => ValidateCoreReturnType<unknown>, VV extends (value: any) => ValidateCoreReturnType<unknown> = (value: unknown) => ValidateCoreReturnType<unknown>, K = ExtractValidatedType<KV>, V = ExtractValidatedType<VV>>(keyValidator?: KV, valueValidator?: VV, message?: string) => (value: Map<K, V>) => ValidateCoreReturnType<Map<K, V>>;
24
- export {};
23
+ export declare const map: <KV extends (value: any) => ValidateCoreReturnType<unknown> = (value: unknown) => ValidateCoreReturnType<unknown>, VV extends (value: any) => ValidateCoreReturnType<unknown> = (value: unknown) => ValidateCoreReturnType<unknown>, K = MapExtractValidatedType<KV>, V = MapExtractValidatedType<VV>>(keyValidator?: KV, valueValidator?: VV, message?: string) => (value: Map<K, V>) => ValidateCoreReturnType<Map<K, V>>;
@@ -1 +1 @@
1
- {"version":3,"file":"core.js","sourceRoot":"","sources":["../../../src/Validate/map/core.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,GAAG,GAAG,CAYjB,YAAiB,EACjB,cAAmB,EACnB,OAAgB,EAChB,EAAE;IACF,OAAO,CAAC,KAAgB,EAAqC,EAAE;QAC7D,IAAI,CAAC,CAAC,KAAK,YAAY,GAAG,CAAC,EAAE,CAAC;YAC5B,OAAO;gBACL,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE,OAAO,IAAI,EAAE;gBACtB,IAAI,EAAE,KAAK;aACZ,CAAC;QACJ,CAAC;QACD,KAAK,MAAM,CAAC,QAAQ,EAAE,UAAU,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AAE,CAAC;gBACjB,MAAM,SAAS,GACb,YACD,CAAC,QAAQ,CAAC,CAAC;gBACZ,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;oBACxB,OAAO;wBACL,QAAQ,EAAE,KAAK;wBACf,OAAO,EAAE,SAAS,CAAC,OAAO;wBAC1B,IAAI,EAAE,KAAK;qBACZ,CAAC;gBACJ,CAAC;YACH,CAAC;YACD,IAAI,cAAc,EAAE,CAAC;gBACnB,MAAM,WAAW,GACf,cAID,CAAC,UAAU,CAAC,CAAC;gBACd,IAAI,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC;oBAC1B,OAAO;wBACL,QAAQ,EAAE,KAAK;wBACf,OAAO,EAAE,WAAW,CAAC,OAAO;wBAC5B,IAAI,EAAE,KAAK;qBACZ,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;QACD,OAAO;YACL,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE;YACX,IAAI,EAAE,KAAK;SACZ,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -1,15 +1,14 @@
1
1
  import type { ValidateCoreReturnType, ValidateType } from "../../Validate/type";
2
- type ExtractValidatedType<V> = V extends (value: never) => {
2
+ export type IntersectionExtractValidatedType<V> = V extends (value: never) => {
3
3
  type: infer T;
4
4
  } ? ValidateType<T> : never;
5
- type IntersectValidatedTypes<Vs> = Vs extends readonly [
5
+ export type IntersectValidatedTypes<Vs> = Vs extends readonly [
6
6
  infer Head,
7
7
  ...infer Tail
8
- ] ? ExtractValidatedType<Head> & IntersectValidatedTypes<Tail> : unknown;
8
+ ] ? IntersectionExtractValidatedType<Head> & IntersectValidatedTypes<Tail> : unknown;
9
9
  /**
10
10
  * Creates an intersection validator that passes only if all given validators pass
11
11
  * @param validators - Validator functions to compose as an intersection (logical AND)
12
12
  * @returns {Function} - Validator that checks if the value matches all validators
13
13
  */
14
14
  export declare const intersection: <Vs extends ((value: never) => ValidateCoreReturnType<unknown>)[]>(...validators: [...Vs]) => (value: IntersectValidatedTypes<Vs>) => ValidateCoreReturnType<IntersectValidatedTypes<Vs>>;
15
- export {};
@@ -1 +1 @@
1
- {"version":3,"file":"intersection.js","sourceRoot":"","sources":["../../../src/Validate/object/intersection.ts"],"names":[],"mappings":"AA2BA;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAG1B,GAAG,UAAmB,EACtB,EAAE;IACF,OAAO,CACL,KAAkC,EACmB,EAAE;QACvD,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;YACnC,MAAM,MAAM,GACV,SAGD,CAAC,KAAK,CAAC,CAAC;YACT,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;gBACrB,OAAO;oBACL,QAAQ,EAAE,KAAK;oBACf,OAAO,EAAE,MAAM,CAAC,OAAO;oBACvB,IAAI,EAAE,KAAsD;iBAC7D,CAAC;YACJ,CAAC;QACH,CAAC;QACD,OAAO;YACL,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE;YACX,IAAI,EAAE,KAAsD;SAC7D,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"intersection.js","sourceRoot":"","sources":["../../../src/Validate/object/intersection.ts"],"names":[],"mappings":"AA6BA;;;;GAIG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG,CAG1B,GAAG,UAAmB,EACtB,EAAE;IACF,OAAO,CACL,KAAkC,EACmB,EAAE;QACvD,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;YACnC,MAAM,MAAM,GACV,SAGD,CAAC,KAAK,CAAC,CAAC;YACT,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;gBACrB,OAAO;oBACL,QAAQ,EAAE,KAAK;oBACf,OAAO,EAAE,MAAM,CAAC,OAAO;oBACvB,IAAI,EAAE,KAAsD;iBAC7D,CAAC;YACJ,CAAC;QACH,CAAC;QACD,OAAO;YACL,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE;YACX,IAAI,EAAE,KAAsD;SAC7D,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- interface NullReturn {
1
+ export interface NullReturn {
2
2
  validate: boolean;
3
3
  message: string;
4
4
  type: "null";
@@ -15,4 +15,3 @@ export declare const nullable: <T, R extends {
15
15
  message: string;
16
16
  validate: boolean;
17
17
  }>(validator: (value: T) => R) => ((value: T | null) => R | NullReturn);
18
- export {};
@@ -1,4 +1,4 @@
1
- interface UndefinedReturn {
1
+ export interface UndefinedReturn {
2
2
  validate: boolean;
3
3
  message: string;
4
4
  type: "undefined";
@@ -33,4 +33,3 @@ export declare const optional: <T, R extends {
33
33
  message: string;
34
34
  validate: boolean;
35
35
  }>(validator: (value: T) => R) => OptionalValidator<T, R>;
36
- export {};
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { type ObjectShape, type ObjectValidator } from "./core";
8
8
  import { type OptionalValidator } from "./optional";
9
- type PartialShape<T extends ObjectShape> = {
9
+ export type PartialShape<T extends ObjectShape> = {
10
10
  [K in keyof T]: OptionalValidator<Parameters<T[K]>[0], ReturnType<T[K]> extends {
11
11
  type: unknown;
12
12
  message: string;
@@ -22,4 +22,3 @@ type PartialShape<T extends ObjectShape> = {
22
22
  * @returns {ObjectValidator<PartialShape<T>>} - New validator where every key accepts undefined
23
23
  */
24
24
  export declare const partial: <T extends ObjectShape>(validator: ObjectValidator<T>, message?: string) => ObjectValidator<PartialShape<T>>;
25
- export {};
@@ -6,8 +6,8 @@
6
6
  */
7
7
  import { type ObjectShape, type ObjectValidator } from "./core";
8
8
  import type { OptionalValidator } from "./optional";
9
- type UnwrapOptional<V> = V extends OptionalValidator<infer Inner, infer R> ? (value: Inner) => R : V;
10
- type RequiredShape<T extends ObjectShape> = {
9
+ export type UnwrapOptional<V> = V extends OptionalValidator<infer Inner, infer R> ? (value: Inner) => R : V;
10
+ export type RequiredShape<T extends ObjectShape> = {
11
11
  [K in keyof T]: UnwrapOptional<T[K]> extends ObjectShape[string] ? UnwrapOptional<T[K]> : T[K];
12
12
  };
13
13
  /**
@@ -19,4 +19,3 @@ type RequiredShape<T extends ObjectShape> = {
19
19
  * @returns {ObjectValidator<RequiredShape<T>>} - New validator where every optional layer is removed
20
20
  */
21
21
  export declare const required: <T extends ObjectShape>(validator: ObjectValidator<T>, message?: string) => ObjectValidator<RequiredShape<T>>;
22
- export {};
@@ -1,5 +1,5 @@
1
1
  import type { ValidateCoreReturnType, ValidateType } from "../../Validate/type";
2
- type ExtractValidatedType<V> = V extends (value: never) => {
2
+ export type UnionExtractValidatedType<V> = V extends (value: never) => {
3
3
  type: infer T;
4
4
  } ? ValidateType<T> : never;
5
5
  /**
@@ -7,5 +7,4 @@ type ExtractValidatedType<V> = V extends (value: never) => {
7
7
  * @param validators - Validator functions to compose as a union (logical OR)
8
8
  * @returns {Function} - Validator that checks if the value matches any of the validators
9
9
  */
10
- export declare const union: <Vs extends ((value: never) => ValidateCoreReturnType<unknown>)[]>(...validators: [...Vs]) => (value: ExtractValidatedType<Vs[number]>) => ValidateCoreReturnType<ExtractValidatedType<Vs[number]>>;
11
- export {};
10
+ export declare const union: <Vs extends ((value: never) => ValidateCoreReturnType<unknown>)[]>(...validators: [...Vs]) => (value: UnionExtractValidatedType<Vs[number]>) => ValidateCoreReturnType<UnionExtractValidatedType<Vs[number]>>;
@@ -1 +1 @@
1
- {"version":3,"file":"union.js","sourceRoot":"","sources":["../../../src/Validate/object/union.ts"],"names":[],"mappings":"AAeA;;;;GAIG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAGnB,GAAG,UAAmB,EACtB,EAAE;IACF,OAAO,CACL,KAAuC,EACmB,EAAE;QAC5D,IAAI,WAAW,GAAG,EAAE,CAAC;QACrB,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;YACnC,MAAM,MAAM,GACV,SAGD,CAAC,KAAK,CAAC,CAAC;YACT,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;gBACpB,OAAO;oBACL,QAAQ,EAAE,IAAI;oBACd,OAAO,EAAE,EAAE;oBACX,IAAI,EAAE,KAA2D;iBAClE,CAAC;YACJ,CAAC;YACD,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC;QAC/B,CAAC;QACD,OAAO;YACL,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,WAAW;YACpB,IAAI,EAAE,KAA2D;SAClE,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"union.js","sourceRoot":"","sources":["../../../src/Validate/object/union.ts"],"names":[],"mappings":"AAiBA;;;;GAIG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAGnB,GAAG,UAAmB,EACtB,EAAE;IACF,OAAO,CACL,KAA4C,EACmB,EAAE;QACjE,IAAI,WAAW,GAAG,EAAE,CAAC;QACrB,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;YACnC,MAAM,MAAM,GACV,SAGD,CAAC,KAAK,CAAC,CAAC;YACT,IAAI,MAAM,CAAC,QAAQ,EAAE,CAAC;gBACpB,OAAO;oBACL,QAAQ,EAAE,IAAI;oBACd,OAAO,EAAE,EAAE;oBACX,IAAI,EAAE,KAEL;iBACF,CAAC;YACJ,CAAC;YACD,WAAW,GAAG,MAAM,CAAC,OAAO,CAAC;QAC/B,CAAC;QACD,OAAO;YACL,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,WAAW;YACpB,IAAI,EAAE,KAAgE;SACvE,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -8,7 +8,7 @@
8
8
  * already exposes a `set` runtime helper.
9
9
  */
10
10
  import type { ValidateCoreReturnType, ValidateType } from "../../Validate/type";
11
- type ExtractValidatedType<V> = V extends (value: never) => {
11
+ export type SetExtractValidatedType<V> = V extends (value: never) => {
12
12
  type: infer T;
13
13
  } ? ValidateType<T> : never;
14
14
  /**
@@ -20,5 +20,4 @@ type ExtractValidatedType<V> = V extends (value: never) => {
20
20
  * @param {string} [message] - Custom error message for type validation
21
21
  * @returns {Function} - Validator function for Set instances
22
22
  */
23
- export declare const set_: <IV extends (value: any) => ValidateCoreReturnType<unknown> = (value: unknown) => ValidateCoreReturnType<unknown>, T = ExtractValidatedType<IV>>(itemValidator?: IV, message?: string) => (value: Set<T>) => ValidateCoreReturnType<Set<T>>;
24
- export {};
23
+ export declare const set_: <IV extends (value: any) => ValidateCoreReturnType<unknown> = (value: unknown) => ValidateCoreReturnType<unknown>, T = SetExtractValidatedType<IV>>(itemValidator?: IV, message?: string) => (value: Set<T>) => ValidateCoreReturnType<Set<T>>;
@@ -1 +1 @@
1
- {"version":3,"file":"core.js","sourceRoot":"","sources":["../../../src/Validate/set/core.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAQH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAOlB,aAAkB,EAClB,OAAgB,EAChB,EAAE;IACF,OAAO,CAAC,KAAa,EAAkC,EAAE;QACvD,IAAI,CAAC,CAAC,KAAK,YAAY,GAAG,CAAC,EAAE,CAAC;YAC5B,OAAO;gBACL,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE,OAAO,IAAI,EAAE;gBACtB,IAAI,EAAE,KAAK;aACZ,CAAC;QACJ,CAAC;QACD,IAAI,aAAa,EAAE,CAAC;YAClB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;gBACzB,MAAM,MAAM,GACV,aAID,CAAC,IAAI,CAAC,CAAC;gBACR,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;oBACrB,OAAO;wBACL,QAAQ,EAAE,KAAK;wBACf,OAAO,EAAE,MAAM,CAAC,OAAO;wBACvB,IAAI,EAAE,KAAK;qBACZ,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;QACD,OAAO;YACL,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE;YACX,IAAI,EAAE,KAAK;SACZ,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"core.js","sourceRoot":"","sources":["../../../src/Validate/set/core.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAUH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAOlB,aAAkB,EAClB,OAAgB,EAChB,EAAE;IACF,OAAO,CAAC,KAAa,EAAkC,EAAE;QACvD,IAAI,CAAC,CAAC,KAAK,YAAY,GAAG,CAAC,EAAE,CAAC;YAC5B,OAAO;gBACL,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE,OAAO,IAAI,EAAE;gBACtB,IAAI,EAAE,KAAK;aACZ,CAAC;QACJ,CAAC;QACD,IAAI,aAAa,EAAE,CAAC;YAClB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;gBACzB,MAAM,MAAM,GACV,aAID,CAAC,IAAI,CAAC,CAAC;gBACR,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;oBACrB,OAAO;wBACL,QAAQ,EAAE,KAAK;wBACf,OAAO,EAAE,MAAM,CAAC,OAAO;wBACvB,IAAI,EAAE,KAAK;qBACZ,CAAC;gBACJ,CAAC;YACH,CAAC;QACH,CAAC;QACD,OAAO;YACL,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE;YACX,IAAI,EAAE,KAAK;SACZ,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -7,7 +7,7 @@
7
7
  * inferred type is the corresponding TypeScript template literal type.
8
8
  */
9
9
  import type { ValidateType } from "../../Validate/type";
10
- type AnyValidator = (value?: any) => {
10
+ export type TemplateLiteralAnyValidator = (value?: any) => {
11
11
  type: unknown;
12
12
  };
13
13
  /**
@@ -15,12 +15,12 @@ type AnyValidator = (value?: any) => {
15
15
  * string literal that must appear verbatim, or a primitive validator whose
16
16
  * accepted shape is converted to a regex fragment at construction time.
17
17
  */
18
- export type TemplateLiteralPart = string | AnyValidator;
19
- type ExtractValidatorTag<V> = V extends (value: never) => {
18
+ export type TemplateLiteralPart = string | TemplateLiteralAnyValidator;
19
+ export type ExtractValidatorTag<V> = V extends (value: never) => {
20
20
  type: infer T;
21
21
  } ? T : never;
22
- type TagToTemplate<T> = T extends "string" ? string : T extends "number" ? number : T extends "boolean" ? boolean : T extends "bigint" ? bigint : ValidateType<T>;
23
- type PartToTemplate<P> = P extends string ? P : TagToTemplate<ExtractValidatorTag<P>>;
22
+ export type TagToTemplate<T> = T extends "string" ? string : T extends "number" ? number : T extends "boolean" ? boolean : T extends "bigint" ? bigint : ValidateType<T>;
23
+ export type PartToTemplate<P> = P extends string ? P : TagToTemplate<ExtractValidatorTag<P>>;
24
24
  /**
25
25
  * Builds the template literal type produced by joining `Parts`. Each part is
26
26
  * mapped to either its literal string value or to the runtime type that the
@@ -52,4 +52,3 @@ export interface TemplateLiteralReturnType<T extends string> {
52
52
  * @returns {Function} - Validator function for template literal strings
53
53
  */
54
54
  export declare const templateLiteral: <const Parts extends readonly TemplateLiteralPart[]>(parts: Parts, message?: string) => (value: BuildTemplateLiteral<Parts>) => TemplateLiteralReturnType<BuildTemplateLiteral<Parts>>;
55
- export {};
@@ -1 +1 @@
1
- {"version":3,"file":"core.js","sourceRoot":"","sources":["../../../src/Validate/templateLiteral/core.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAyDH,MAAM,WAAW,GAAG,CAAC,KAAa,EAAU,EAAE,CAC5C,KAAK,CAAC,UAAU,CAAC,qBAAqB,EAAE,MAAM,CAAC,GAAG,CAAA,KAAK,CAAC,CAAC;AAE3D,MAAM,YAAY,GAAG,CAAC,GAAY,EAAU,EAAE;IAC5C,QAAQ,GAAG,EAAE,CAAC;QACZ,KAAK,QAAQ,CAAC,CAAC,CAAC;YACd,OAAO,KAAK,CAAC;QACf,CAAC;QACD,KAAK,QAAQ,CAAC,CAAC,CAAC;YACd,OAAO,MAAM,CAAC,GAAG,CAAA,oCAAoC,CA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,IAAI,CAAC,CAAC,GAAG,CAAC;IACxD,CAAC;IACD,OAAO,IAAI,GAAG,CAAC;IACf,MAAM,KAAK,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;IAElC,OAAO,CACL,KAAkC,EACsB,EAAE;QAC1D,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACpD,OAAO;gBACL,QAAQ,EAAE,KAAK;gBACf,OAAO,EAAE,OAAO,IAAI,EAAE;gBACtB,IAAI,EAAE,KAAK;aACZ,CAAC;QACJ,CAAC;QACD,OAAO;YACL,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,EAAE;YACX,IAAI,EAAE,KAAK;SACZ,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { ArrayToUnion } from "../types/logic/arrayToUnion";
2
- interface DayList {
2
+ export interface DayList {
3
3
  de: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"];
4
4
  ko: ["일", "월", "화", "수", "목", "금", "토"];
5
5
  en: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"];
@@ -17,4 +17,3 @@ interface DayList {
17
17
  * getDay(1, "fr"); // Returns "Lun"
18
18
  */
19
19
  export declare const getDay: <T extends keyof DayList>(day: number, lang?: T) => ArrayToUnion<DayList[T]>;
20
- export {};
@@ -1,6 +1,6 @@
1
- type PropertyName = string | number | symbol;
2
- type IterateeFunction<T> = (value: T) => PropertyName;
3
- type Iteratee<T> = IterateeFunction<T> | keyof T;
1
+ export type PropertyName = string | number | symbol;
2
+ export type IterateeFunction<T> = (value: T) => PropertyName;
3
+ export type Iteratee<T> = IterateeFunction<T> | keyof T;
4
4
  /**
5
5
  * Creates an object composed of keys generated from the results of running each element of collection through iteratee
6
6
  * @param collection The collection to iterate over
@@ -17,4 +17,3 @@ type Iteratee<T> = IterateeFunction<T> | keyof T;
17
17
  * - `removePrototypeMapDeep` — recursive sanitization of an array of objects (for deeply nested data)
18
18
  */
19
19
  export declare function keyBy<T>(collection: T[] | Record<PropertyName, T>, iteratee?: Iteratee<T>): Record<PropertyName, T>;
20
- export {};
@@ -1,5 +1,5 @@
1
1
  import type { ValidateCoreReturnType, ValidateType } from "../../Validate/type";
2
- type ExtractValidatedType<V> = V extends (value: never) => {
2
+ export type ArrayOfExtractValidatedType<V> = V extends (value: never) => {
3
3
  type: infer T;
4
4
  } ? ValidateType<T> : never;
5
5
  /**
@@ -13,5 +13,4 @@ export declare const arrayOf: <V extends (value: never) => {
13
13
  type: unknown;
14
14
  message: string;
15
15
  validate: boolean;
16
- }>(validator: V, message?: string) => (values: ExtractValidatedType<V>[]) => ValidateCoreReturnType<ExtractValidatedType<V>[]>;
17
- export {};
16
+ }>(validator: V, message?: string) => (values: ArrayOfExtractValidatedType<V>[]) => ValidateCoreReturnType<ArrayOfExtractValidatedType<V>[]>;
@@ -11,27 +11,27 @@
11
11
  * the schema on every call.
12
12
  */
13
13
  import type { ValidateCoreReturnType, ValidateType } from "../../Validate/type";
14
- type AnyValidator = (value: any) => ValidateCoreReturnType<unknown>;
15
- type ExtractValidatedType<V> = V extends (value: never) => {
14
+ export type FunctionAnyValidator = (value: any) => ValidateCoreReturnType<unknown>;
15
+ export type FunctionExtractValidatedType<V> = V extends (value: never) => {
16
16
  type: infer T;
17
17
  } ? ValidateType<T> : never;
18
- type InferInputs<Inputs> = Inputs extends readonly AnyValidator[] ? {
19
- [K in keyof Inputs]: ExtractValidatedType<Inputs[K]>;
18
+ export type InferInputs<Inputs> = Inputs extends readonly FunctionAnyValidator[] ? {
19
+ [K in keyof Inputs]: FunctionExtractValidatedType<Inputs[K]>;
20
20
  } : any[];
21
- type InferOutput<Output> = Output extends AnyValidator ? ExtractValidatedType<Output> : any;
21
+ export type InferOutput<Output> = Output extends FunctionAnyValidator ? FunctionExtractValidatedType<Output> : any;
22
22
  /**
23
23
  * Function schema definition. `input` describes positional parameters and
24
24
  * `output` describes the return type. Both are optional; when omitted the
25
25
  * validator only enforces that the value is callable.
26
26
  */
27
27
  export interface FunctionSchema {
28
- input?: readonly AnyValidator[];
29
- output?: AnyValidator;
28
+ input?: readonly FunctionAnyValidator[];
29
+ output?: FunctionAnyValidator;
30
30
  }
31
- type ExtractInput<S> = S extends {
31
+ export type ExtractInput<S> = S extends {
32
32
  input: infer I;
33
33
  } ? I : undefined;
34
- type ExtractOutput<S> = S extends {
34
+ export type ExtractOutput<S> = S extends {
35
35
  output: infer O;
36
36
  } ? O : undefined;
37
37
  /**
@@ -72,4 +72,3 @@ export interface FunctionValidator<Inputs, Output> {
72
72
  * @returns {FunctionValidator} - Validator augmented with `implement()`
73
73
  */
74
74
  export declare const function_: <const S extends FunctionSchema = FunctionSchema>(schema?: S, message?: string) => FunctionValidator<ExtractInput<S>, ExtractOutput<S>>;
75
- export {};
@@ -28,8 +28,6 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
28
28
  * the schema on every call.
29
29
  */
30
30
 
31
- // biome-ignore lint/suspicious/noExplicitAny: validator signatures vary
32
-
33
31
  /**
34
32
  * Function schema definition. `input` describes positional parameters and
35
33
  * `output` describes the return type. Both are optional; when omitted the
@@ -5,7 +5,7 @@
5
5
  * `instanceof_` because `instanceof` is a reserved keyword in JavaScript.
6
6
  */
7
7
  import type { ValidateCoreReturnType } from "../../Validate/type";
8
- type Constructor<T> = new (...arguments_: any[]) => T;
8
+ export type Constructor<T> = new (...arguments_: any[]) => T;
9
9
  /**
10
10
  * Creates a validator that checks whether a value is an instance of the given
11
11
  * constructor. Subclasses of the constructor satisfy the validator, matching
@@ -16,4 +16,3 @@ type Constructor<T> = new (...arguments_: any[]) => T;
16
16
  * @returns {Function} - Validator function for instances of the constructor
17
17
  */
18
18
  export declare const instanceof_: <T>(classConstructor: Constructor<T>, message?: string) => (value: T) => ValidateCoreReturnType<T>;
19
- export {};
@@ -5,7 +5,7 @@
5
5
  * `arrayOf()` validates each element of an array.
6
6
  */
7
7
  import type { ValidateCoreReturnType, ValidateType } from "../../Validate/type";
8
- type ExtractValidatedType<V> = V extends (value: never) => {
8
+ export type MapExtractValidatedType<V> = V extends (value: never) => {
9
9
  type: infer T;
10
10
  } ? ValidateType<T> : never;
11
11
  /**
@@ -20,5 +20,4 @@ type ExtractValidatedType<V> = V extends (value: never) => {
20
20
  * @param {string} [message] - Custom error message for type validation
21
21
  * @returns {Function} - Validator function for Map instances
22
22
  */
23
- export declare const map: <KV extends (value: any) => ValidateCoreReturnType<unknown> = (value: unknown) => ValidateCoreReturnType<unknown>, VV extends (value: any) => ValidateCoreReturnType<unknown> = (value: unknown) => ValidateCoreReturnType<unknown>, K = ExtractValidatedType<KV>, V = ExtractValidatedType<VV>>(keyValidator?: KV, valueValidator?: VV, message?: string) => (value: Map<K, V>) => ValidateCoreReturnType<Map<K, V>>;
24
- export {};
23
+ export declare const map: <KV extends (value: any) => ValidateCoreReturnType<unknown> = (value: unknown) => ValidateCoreReturnType<unknown>, VV extends (value: any) => ValidateCoreReturnType<unknown> = (value: unknown) => ValidateCoreReturnType<unknown>, K = MapExtractValidatedType<KV>, V = MapExtractValidatedType<VV>>(keyValidator?: KV, valueValidator?: VV, message?: string) => (value: Map<K, V>) => ValidateCoreReturnType<Map<K, V>>;
@@ -1,15 +1,14 @@
1
1
  import type { ValidateCoreReturnType, ValidateType } from "../../Validate/type";
2
- type ExtractValidatedType<V> = V extends (value: never) => {
2
+ export type IntersectionExtractValidatedType<V> = V extends (value: never) => {
3
3
  type: infer T;
4
4
  } ? ValidateType<T> : never;
5
- type IntersectValidatedTypes<Vs> = Vs extends readonly [
5
+ export type IntersectValidatedTypes<Vs> = Vs extends readonly [
6
6
  infer Head,
7
7
  ...infer Tail
8
- ] ? ExtractValidatedType<Head> & IntersectValidatedTypes<Tail> : unknown;
8
+ ] ? IntersectionExtractValidatedType<Head> & IntersectValidatedTypes<Tail> : unknown;
9
9
  /**
10
10
  * Creates an intersection validator that passes only if all given validators pass
11
11
  * @param validators - Validator functions to compose as an intersection (logical AND)
12
12
  * @returns {Function} - Validator that checks if the value matches all validators
13
13
  */
14
14
  export declare const intersection: <Vs extends ((value: never) => ValidateCoreReturnType<unknown>)[]>(...validators: [...Vs]) => (value: IntersectValidatedTypes<Vs>) => ValidateCoreReturnType<IntersectValidatedTypes<Vs>>;
15
- export {};
@@ -1,4 +1,4 @@
1
- interface NullReturn {
1
+ export interface NullReturn {
2
2
  validate: boolean;
3
3
  message: string;
4
4
  type: "null";
@@ -15,4 +15,3 @@ export declare const nullable: <T, R extends {
15
15
  message: string;
16
16
  validate: boolean;
17
17
  }>(validator: (value: T) => R) => ((value: T | null) => R | NullReturn);
18
- export {};
@@ -1,4 +1,4 @@
1
- interface UndefinedReturn {
1
+ export interface UndefinedReturn {
2
2
  validate: boolean;
3
3
  message: string;
4
4
  type: "undefined";
@@ -33,4 +33,3 @@ export declare const optional: <T, R extends {
33
33
  message: string;
34
34
  validate: boolean;
35
35
  }>(validator: (value: T) => R) => OptionalValidator<T, R>;
36
- export {};
@@ -6,7 +6,7 @@
6
6
  */
7
7
  import { type ObjectShape, type ObjectValidator } from "./core";
8
8
  import { type OptionalValidator } from "./optional";
9
- type PartialShape<T extends ObjectShape> = {
9
+ export type PartialShape<T extends ObjectShape> = {
10
10
  [K in keyof T]: OptionalValidator<Parameters<T[K]>[0], ReturnType<T[K]> extends {
11
11
  type: unknown;
12
12
  message: string;
@@ -22,4 +22,3 @@ type PartialShape<T extends ObjectShape> = {
22
22
  * @returns {ObjectValidator<PartialShape<T>>} - New validator where every key accepts undefined
23
23
  */
24
24
  export declare const partial: <T extends ObjectShape>(validator: ObjectValidator<T>, message?: string) => ObjectValidator<PartialShape<T>>;
25
- export {};
@@ -6,8 +6,8 @@
6
6
  */
7
7
  import { type ObjectShape, type ObjectValidator } from "./core";
8
8
  import type { OptionalValidator } from "./optional";
9
- type UnwrapOptional<V> = V extends OptionalValidator<infer Inner, infer R> ? (value: Inner) => R : V;
10
- type RequiredShape<T extends ObjectShape> = {
9
+ export type UnwrapOptional<V> = V extends OptionalValidator<infer Inner, infer R> ? (value: Inner) => R : V;
10
+ export type RequiredShape<T extends ObjectShape> = {
11
11
  [K in keyof T]: UnwrapOptional<T[K]> extends ObjectShape[string] ? UnwrapOptional<T[K]> : T[K];
12
12
  };
13
13
  /**
@@ -19,4 +19,3 @@ type RequiredShape<T extends ObjectShape> = {
19
19
  * @returns {ObjectValidator<RequiredShape<T>>} - New validator where every optional layer is removed
20
20
  */
21
21
  export declare const required: <T extends ObjectShape>(validator: ObjectValidator<T>, message?: string) => ObjectValidator<RequiredShape<T>>;
22
- export {};
@@ -1,5 +1,5 @@
1
1
  import type { ValidateCoreReturnType, ValidateType } from "../../Validate/type";
2
- type ExtractValidatedType<V> = V extends (value: never) => {
2
+ export type UnionExtractValidatedType<V> = V extends (value: never) => {
3
3
  type: infer T;
4
4
  } ? ValidateType<T> : never;
5
5
  /**
@@ -7,5 +7,4 @@ type ExtractValidatedType<V> = V extends (value: never) => {
7
7
  * @param validators - Validator functions to compose as a union (logical OR)
8
8
  * @returns {Function} - Validator that checks if the value matches any of the validators
9
9
  */
10
- export declare const union: <Vs extends ((value: never) => ValidateCoreReturnType<unknown>)[]>(...validators: [...Vs]) => (value: ExtractValidatedType<Vs[number]>) => ValidateCoreReturnType<ExtractValidatedType<Vs[number]>>;
11
- export {};
10
+ export declare const union: <Vs extends ((value: never) => ValidateCoreReturnType<unknown>)[]>(...validators: [...Vs]) => (value: UnionExtractValidatedType<Vs[number]>) => ValidateCoreReturnType<UnionExtractValidatedType<Vs[number]>>;
@@ -8,7 +8,7 @@
8
8
  * already exposes a `set` runtime helper.
9
9
  */
10
10
  import type { ValidateCoreReturnType, ValidateType } from "../../Validate/type";
11
- type ExtractValidatedType<V> = V extends (value: never) => {
11
+ export type SetExtractValidatedType<V> = V extends (value: never) => {
12
12
  type: infer T;
13
13
  } ? ValidateType<T> : never;
14
14
  /**
@@ -20,5 +20,4 @@ type ExtractValidatedType<V> = V extends (value: never) => {
20
20
  * @param {string} [message] - Custom error message for type validation
21
21
  * @returns {Function} - Validator function for Set instances
22
22
  */
23
- export declare const set_: <IV extends (value: any) => ValidateCoreReturnType<unknown> = (value: unknown) => ValidateCoreReturnType<unknown>, T = ExtractValidatedType<IV>>(itemValidator?: IV, message?: string) => (value: Set<T>) => ValidateCoreReturnType<Set<T>>;
24
- export {};
23
+ export declare const set_: <IV extends (value: any) => ValidateCoreReturnType<unknown> = (value: unknown) => ValidateCoreReturnType<unknown>, T = SetExtractValidatedType<IV>>(itemValidator?: IV, message?: string) => (value: Set<T>) => ValidateCoreReturnType<Set<T>>;
@@ -7,7 +7,7 @@
7
7
  * inferred type is the corresponding TypeScript template literal type.
8
8
  */
9
9
  import type { ValidateType } from "../../Validate/type";
10
- type AnyValidator = (value?: any) => {
10
+ export type TemplateLiteralAnyValidator = (value?: any) => {
11
11
  type: unknown;
12
12
  };
13
13
  /**
@@ -15,12 +15,12 @@ type AnyValidator = (value?: any) => {
15
15
  * string literal that must appear verbatim, or a primitive validator whose
16
16
  * accepted shape is converted to a regex fragment at construction time.
17
17
  */
18
- export type TemplateLiteralPart = string | AnyValidator;
19
- type ExtractValidatorTag<V> = V extends (value: never) => {
18
+ export type TemplateLiteralPart = string | TemplateLiteralAnyValidator;
19
+ export type ExtractValidatorTag<V> = V extends (value: never) => {
20
20
  type: infer T;
21
21
  } ? T : never;
22
- type TagToTemplate<T> = T extends "string" ? string : T extends "number" ? number : T extends "boolean" ? boolean : T extends "bigint" ? bigint : ValidateType<T>;
23
- type PartToTemplate<P> = P extends string ? P : TagToTemplate<ExtractValidatorTag<P>>;
22
+ export type TagToTemplate<T> = T extends "string" ? string : T extends "number" ? number : T extends "boolean" ? boolean : T extends "bigint" ? bigint : ValidateType<T>;
23
+ export type PartToTemplate<P> = P extends string ? P : TagToTemplate<ExtractValidatorTag<P>>;
24
24
  /**
25
25
  * Builds the template literal type produced by joining `Parts`. Each part is
26
26
  * mapped to either its literal string value or to the runtime type that the
@@ -52,4 +52,3 @@ export interface TemplateLiteralReturnType<T extends string> {
52
52
  * @returns {Function} - Validator function for template literal strings
53
53
  */
54
54
  export declare const templateLiteral: <const Parts extends readonly TemplateLiteralPart[]>(parts: Parts, message?: string) => (value: BuildTemplateLiteral<Parts>) => TemplateLiteralReturnType<BuildTemplateLiteral<Parts>>;
55
- export {};
@@ -1,4 +1,3 @@
1
1
  import type { Length } from "../logic/length";
2
- type Chunk<T, N extends number, C extends unknown[] = [], R extends unknown[] = []> = T extends [infer F, ...infer L] ? Length<C> extends N ? Chunk<L, N, [F], [...R, C]> : Chunk<L, N, [...C, F], R> : Length<C> extends 0 ? Length<R> extends 0 ? T[] : R : [...R, C];
2
+ export type Chunk<T, N extends number, C extends unknown[] = [], R extends unknown[] = []> = T extends [infer F, ...infer L] ? Length<C> extends N ? Chunk<L, N, [F], [...R, C]> : Chunk<L, N, [...C, F], R> : Length<C> extends 0 ? Length<R> extends 0 ? T[] : R : [...R, C];
3
3
  export type ChunkArrayType<T, N extends number> = Chunk<T, N>;
4
- export {};
@@ -1,3 +1,5 @@
1
- type ZIP<T, O extends unknown[] = []> = T extends [infer Head, ...infer Tail] ? Head extends unknown[] ? ZIP<Tail, [...O, Head[number]]> : never : T extends [] ? O[] : T;
1
+ export type ZIP<T, O extends unknown[] = []> = T extends [
2
+ infer Head,
3
+ ...infer Tail
4
+ ] ? Head extends unknown[] ? ZIP<Tail, [...O, Head[number]]> : never : T extends [] ? O[] : T;
2
5
  export type ZipArrayType<T extends unknown[][]> = ZIP<T>;
3
- export {};
@@ -1,3 +1,2 @@
1
1
  export type Binary1bitNor<X extends `${0 | 1}`, Y extends `${0 | 1}`> = Binary1bitNorParser<X, Y>;
2
- type Binary1bitNorParser<X extends string, Y extends string> = X extends "1" ? "0" : Y extends "1" ? "0" : "1";
3
- export {};
2
+ export type Binary1bitNorParser<X extends string, Y extends string> = X extends "1" ? "0" : Y extends "1" ? "0" : "1";
@@ -5,5 +5,4 @@ import type { LengthOfString } from "./lengthOfString";
5
5
  import type { ShiftString } from "./shiftString";
6
6
  import type { StringReverse } from "./stringReverse";
7
7
  export type BinaryFullAdder<X extends string, Y extends string, B extends number = LengthOfString<X>> = LengthOfString<X> extends LengthOfString<Y> ? FirstNChars<ShiftString<StringReverse<BinaryFullAdderParser<StringReverse<FirstNChars<X, B>>, StringReverse<FirstNChars<Y, B>>>>>, B> : never;
8
- type BinaryFullAdderParser<X extends string, Y extends string, A extends string = "", C extends string = "0"> = X extends `${infer F}${infer R}` ? Y extends `${infer F2}${infer R2}` ? BinaryHalfAdderParser<F, F2> extends `${infer F3}${infer R3}` ? BinaryHalfAdderParser<R3, C> extends `${infer F4}${infer R4}` ? BinaryFullAdderParser<R, R2, `${A}${R4}`, Binary1bitOrParser<F3, F4>> : never : never : never : `${A}${C}`;
9
- export {};
8
+ export type BinaryFullAdderParser<X extends string, Y extends string, A extends string = "", C extends string = "0"> = X extends `${infer F}${infer R}` ? Y extends `${infer F2}${infer R2}` ? BinaryHalfAdderParser<F, F2> extends `${infer F3}${infer R3}` ? BinaryHalfAdderParser<R3, C> extends `${infer F4}${infer R4}` ? BinaryFullAdderParser<R, R2, `${A}${R4}`, Binary1bitOrParser<F3, F4>> : never : never : never : `${A}${C}`;
@@ -2,5 +2,4 @@ import type { Add } from "./add";
2
2
  import type { Subtract } from "./subtract";
3
3
  import type { BGreaterThanA } from "../logic/bGreaterThanA";
4
4
  export type Divide<A extends number, B extends number> = A extends 0 ? never : B extends 0 ? never : `${A}` extends `-${infer N extends number}` ? `${B}` extends `-${infer M extends number}` ? DivideHelper<N, M> : `-${DivideHelper<N, B>}` extends `${infer R extends number}` ? R : never : `${B}` extends `-${infer M extends number}` ? `-${DivideHelper<A, M>}` extends `${infer R extends number}` ? R : never : DivideHelper<A, B>;
5
- type DivideHelper<X extends number, Y extends number, A extends number = 0> = BGreaterThanA<X, Y> extends true ? A : DivideHelper<Subtract<X, Y>, Y, Add<A, 1>>;
6
- export {};
5
+ export type DivideHelper<X extends number, Y extends number, A extends number = 0> = BGreaterThanA<X, Y> extends true ? A : DivideHelper<Subtract<X, Y>, Y, Add<A, 1>>;
@@ -1,5 +1,4 @@
1
1
  import type { Add } from "./add";
2
2
  import type { Subtract } from "./subtract";
3
3
  export type Multiply<A extends number, B extends number> = MultiHelper<A, B>;
4
- type MultiHelper<X extends number, Y extends number, A extends number = 0> = `${X}` extends `-${infer N extends number}` ? `${Y}` extends `-${infer M extends number}` ? MultiHelper<N, M, A> : `-${MultiHelper<N, Y, A>}` extends `${infer R extends number}` ? R : never : `${Y}` extends `-${infer M extends number}` ? `-${MultiHelper<X, M, A>}` extends `${infer R extends number}` ? R : never : Y extends 0 ? A : MultiHelper<X, Subtract<Y, 1>, Add<X, A>>;
5
- export {};
4
+ export type MultiHelper<X extends number, Y extends number, A extends number = 0> = `${X}` extends `-${infer N extends number}` ? `${Y}` extends `-${infer M extends number}` ? MultiHelper<N, M, A> : `-${MultiHelper<N, Y, A>}` extends `${infer R extends number}` ? R : never : `${Y}` extends `-${infer M extends number}` ? `-${MultiHelper<X, M, A>}` extends `${infer R extends number}` ? R : never : Y extends 0 ? A : MultiHelper<X, Subtract<Y, 1>, Add<X, A>>;
@@ -1,13 +1,12 @@
1
1
  import type { PickDeepKey } from "./pickDeepKey";
2
2
  import type { UnionToIntersection } from "../logic/unionToIntersection";
3
- type GetValueAtPath<T, P extends string> = P extends `${infer Key}.${infer Rest}` ? Key extends keyof T ? T[Key] extends object ? GetValueAtPath<T[Key], Rest> : never : never : P extends keyof T ? T[P] : never;
4
- type ConstructNestedObject<P extends string, V> = P extends `${infer Key}.${infer Rest}` ? {
3
+ export type GetValueAtPath<T, P extends string> = P extends `${infer Key}.${infer Rest}` ? Key extends keyof T ? T[Key] extends object ? GetValueAtPath<T[Key], Rest> : never : never : P extends keyof T ? T[P] : never;
4
+ export type ConstructNestedObject<P extends string, V> = P extends `${infer Key}.${infer Rest}` ? {
5
5
  [K in Key]: ConstructNestedObject<Rest, V>;
6
6
  } : {
7
7
  [K in P]: V;
8
8
  };
9
- type ProcessKeys<T extends object, K extends readonly PickDeepKey<T>[]> = {
9
+ export type ProcessKeys<T extends object, K extends readonly PickDeepKey<T>[]> = {
10
10
  [I in keyof K]: K[I] extends string ? ConstructNestedObject<K[I], GetValueAtPath<T, K[I]>> : never;
11
11
  }[number];
12
12
  export type PickDeep<T extends object, K extends readonly PickDeepKey<T>[]> = UnionToIntersection<ProcessKeys<T, K>>;
13
- export {};
@@ -1,4 +1,3 @@
1
1
  import type { Length } from "../logic/length";
2
- type Chunk<T, N extends number, C extends unknown[] = [], R extends unknown[] = []> = T extends [infer F, ...infer L] ? Length<C> extends N ? Chunk<L, N, [F], [...R, C]> : Chunk<L, N, [...C, F], R> : Length<C> extends 0 ? Length<R> extends 0 ? T[] : R : [...R, C];
2
+ export type Chunk<T, N extends number, C extends unknown[] = [], R extends unknown[] = []> = T extends [infer F, ...infer L] ? Length<C> extends N ? Chunk<L, N, [F], [...R, C]> : Chunk<L, N, [...C, F], R> : Length<C> extends 0 ? Length<R> extends 0 ? T[] : R : [...R, C];
3
3
  export type ChunkArrayType<T, N extends number> = Chunk<T, N>;
4
- export {};
@@ -1,3 +1,5 @@
1
- type ZIP<T, O extends unknown[] = []> = T extends [infer Head, ...infer Tail] ? Head extends unknown[] ? ZIP<Tail, [...O, Head[number]]> : never : T extends [] ? O[] : T;
1
+ export type ZIP<T, O extends unknown[] = []> = T extends [
2
+ infer Head,
3
+ ...infer Tail
4
+ ] ? Head extends unknown[] ? ZIP<Tail, [...O, Head[number]]> : never : T extends [] ? O[] : T;
2
5
  export type ZipArrayType<T extends unknown[][]> = ZIP<T>;
3
- export {};
@@ -1,3 +1,2 @@
1
1
  export type Binary1bitNor<X extends `${0 | 1}`, Y extends `${0 | 1}`> = Binary1bitNorParser<X, Y>;
2
- type Binary1bitNorParser<X extends string, Y extends string> = X extends "1" ? "0" : Y extends "1" ? "0" : "1";
3
- export {};
2
+ export type Binary1bitNorParser<X extends string, Y extends string> = X extends "1" ? "0" : Y extends "1" ? "0" : "1";
@@ -5,5 +5,4 @@ import type { LengthOfString } from "./lengthOfString";
5
5
  import type { ShiftString } from "./shiftString";
6
6
  import type { StringReverse } from "./stringReverse";
7
7
  export type BinaryFullAdder<X extends string, Y extends string, B extends number = LengthOfString<X>> = LengthOfString<X> extends LengthOfString<Y> ? FirstNChars<ShiftString<StringReverse<BinaryFullAdderParser<StringReverse<FirstNChars<X, B>>, StringReverse<FirstNChars<Y, B>>>>>, B> : never;
8
- type BinaryFullAdderParser<X extends string, Y extends string, A extends string = "", C extends string = "0"> = X extends `${infer F}${infer R}` ? Y extends `${infer F2}${infer R2}` ? BinaryHalfAdderParser<F, F2> extends `${infer F3}${infer R3}` ? BinaryHalfAdderParser<R3, C> extends `${infer F4}${infer R4}` ? BinaryFullAdderParser<R, R2, `${A}${R4}`, Binary1bitOrParser<F3, F4>> : never : never : never : `${A}${C}`;
9
- export {};
8
+ export type BinaryFullAdderParser<X extends string, Y extends string, A extends string = "", C extends string = "0"> = X extends `${infer F}${infer R}` ? Y extends `${infer F2}${infer R2}` ? BinaryHalfAdderParser<F, F2> extends `${infer F3}${infer R3}` ? BinaryHalfAdderParser<R3, C> extends `${infer F4}${infer R4}` ? BinaryFullAdderParser<R, R2, `${A}${R4}`, Binary1bitOrParser<F3, F4>> : never : never : never : `${A}${C}`;
@@ -2,5 +2,4 @@ import type { Add } from "./add";
2
2
  import type { Subtract } from "./subtract";
3
3
  import type { BGreaterThanA } from "../logic/bGreaterThanA";
4
4
  export type Divide<A extends number, B extends number> = A extends 0 ? never : B extends 0 ? never : `${A}` extends `-${infer N extends number}` ? `${B}` extends `-${infer M extends number}` ? DivideHelper<N, M> : `-${DivideHelper<N, B>}` extends `${infer R extends number}` ? R : never : `${B}` extends `-${infer M extends number}` ? `-${DivideHelper<A, M>}` extends `${infer R extends number}` ? R : never : DivideHelper<A, B>;
5
- type DivideHelper<X extends number, Y extends number, A extends number = 0> = BGreaterThanA<X, Y> extends true ? A : DivideHelper<Subtract<X, Y>, Y, Add<A, 1>>;
6
- export {};
5
+ export type DivideHelper<X extends number, Y extends number, A extends number = 0> = BGreaterThanA<X, Y> extends true ? A : DivideHelper<Subtract<X, Y>, Y, Add<A, 1>>;
@@ -1,5 +1,4 @@
1
1
  import type { Add } from "./add";
2
2
  import type { Subtract } from "./subtract";
3
3
  export type Multiply<A extends number, B extends number> = MultiHelper<A, B>;
4
- type MultiHelper<X extends number, Y extends number, A extends number = 0> = `${X}` extends `-${infer N extends number}` ? `${Y}` extends `-${infer M extends number}` ? MultiHelper<N, M, A> : `-${MultiHelper<N, Y, A>}` extends `${infer R extends number}` ? R : never : `${Y}` extends `-${infer M extends number}` ? `-${MultiHelper<X, M, A>}` extends `${infer R extends number}` ? R : never : Y extends 0 ? A : MultiHelper<X, Subtract<Y, 1>, Add<X, A>>;
5
- export {};
4
+ export type MultiHelper<X extends number, Y extends number, A extends number = 0> = `${X}` extends `-${infer N extends number}` ? `${Y}` extends `-${infer M extends number}` ? MultiHelper<N, M, A> : `-${MultiHelper<N, Y, A>}` extends `${infer R extends number}` ? R : never : `${Y}` extends `-${infer M extends number}` ? `-${MultiHelper<X, M, A>}` extends `${infer R extends number}` ? R : never : Y extends 0 ? A : MultiHelper<X, Subtract<Y, 1>, Add<X, A>>;
@@ -1,13 +1,12 @@
1
1
  import type { PickDeepKey } from "./pickDeepKey";
2
2
  import type { UnionToIntersection } from "../logic/unionToIntersection";
3
- type GetValueAtPath<T, P extends string> = P extends `${infer Key}.${infer Rest}` ? Key extends keyof T ? T[Key] extends object ? GetValueAtPath<T[Key], Rest> : never : never : P extends keyof T ? T[P] : never;
4
- type ConstructNestedObject<P extends string, V> = P extends `${infer Key}.${infer Rest}` ? {
3
+ export type GetValueAtPath<T, P extends string> = P extends `${infer Key}.${infer Rest}` ? Key extends keyof T ? T[Key] extends object ? GetValueAtPath<T[Key], Rest> : never : never : P extends keyof T ? T[P] : never;
4
+ export type ConstructNestedObject<P extends string, V> = P extends `${infer Key}.${infer Rest}` ? {
5
5
  [K in Key]: ConstructNestedObject<Rest, V>;
6
6
  } : {
7
7
  [K in P]: V;
8
8
  };
9
- type ProcessKeys<T extends object, K extends readonly PickDeepKey<T>[]> = {
9
+ export type ProcessKeys<T extends object, K extends readonly PickDeepKey<T>[]> = {
10
10
  [I in keyof K]: K[I] extends string ? ConstructNestedObject<K[I], GetValueAtPath<T, K[I]>> : never;
11
11
  }[number];
12
12
  export type PickDeep<T extends object, K extends readonly PickDeepKey<T>[]> = UnionToIntersection<ProcessKeys<T, K>>;
13
- export {};
package/package.json CHANGED
@@ -226,5 +226,5 @@
226
226
  },
227
227
  "type": "module",
228
228
  "types": "module/index.d.ts",
229
- "version": "3.0.0"
229
+ "version": "3.1.0"
230
230
  }