typia 5.5.0-dev.20240303-2 → 5.5.0-dev.20240304

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 (93) hide show
  1. package/lib/functional/Namespace/functional.d.ts +4 -0
  2. package/lib/functional/Namespace/functional.js +9 -0
  3. package/lib/functional/Namespace/functional.js.map +1 -0
  4. package/lib/functional/Namespace/index.d.ts +1 -0
  5. package/lib/functional/Namespace/index.js +2 -1
  6. package/lib/functional/Namespace/index.js.map +1 -1
  7. package/lib/functional.d.ts +6 -162
  8. package/lib/functional.js +248 -48
  9. package/lib/functional.js.map +1 -1
  10. package/lib/programmers/AssertProgrammer.js +2 -2
  11. package/lib/programmers/AssertProgrammer.js.map +1 -1
  12. package/lib/programmers/CheckerProgrammer.d.ts +1 -1
  13. package/lib/programmers/FeatureProgrammer.d.ts +1 -1
  14. package/lib/programmers/IsProgrammer.d.ts +1 -1
  15. package/lib/programmers/IsProgrammer.js +3 -3
  16. package/lib/programmers/IsProgrammer.js.map +1 -1
  17. package/lib/programmers/RandomProgrammer.js +2 -2
  18. package/lib/programmers/RandomProgrammer.js.map +1 -1
  19. package/lib/programmers/ValidateProgrammer.js +2 -2
  20. package/lib/programmers/ValidateProgrammer.js.map +1 -1
  21. package/lib/programmers/functional/FunctionalAssertFunctionProgrammer.d.ts +2 -0
  22. package/lib/programmers/functional/FunctionalAssertFunctionProgrammer.js +55 -11
  23. package/lib/programmers/functional/FunctionalAssertFunctionProgrammer.js.map +1 -1
  24. package/lib/programmers/functional/FunctionalAssertParametersProgrammer.d.ts +1 -5
  25. package/lib/programmers/functional/FunctionalAssertParametersProgrammer.js +38 -21
  26. package/lib/programmers/functional/FunctionalAssertParametersProgrammer.js.map +1 -1
  27. package/lib/programmers/functional/FunctionalAssertReturnProgrammer.d.ts +1 -5
  28. package/lib/programmers/functional/FunctionalAssertReturnProgrammer.js +17 -18
  29. package/lib/programmers/functional/FunctionalAssertReturnProgrammer.js.map +1 -1
  30. package/lib/programmers/helpers/FunctionImporeter.d.ts +1 -19
  31. package/lib/programmers/helpers/FunctionImporeter.js +13 -91
  32. package/lib/programmers/helpers/FunctionImporeter.js.map +1 -1
  33. package/lib/programmers/helpers/FunctionImporter.d.ts +19 -0
  34. package/lib/programmers/helpers/FunctionImporter.js +96 -0
  35. package/lib/programmers/helpers/FunctionImporter.js.map +1 -0
  36. package/lib/programmers/helpers/StringifyJoinder.d.ts +1 -1
  37. package/lib/programmers/helpers/disable_function_importer_declare.d.ts +1 -1
  38. package/lib/programmers/http/HttpFormDataProgrammer.js +2 -2
  39. package/lib/programmers/http/HttpFormDataProgrammer.js.map +1 -1
  40. package/lib/programmers/http/HttpHeadersProgrammer.js +2 -2
  41. package/lib/programmers/http/HttpHeadersProgrammer.js.map +1 -1
  42. package/lib/programmers/http/HttpParameterProgrammer.js +2 -2
  43. package/lib/programmers/http/HttpParameterProgrammer.js.map +1 -1
  44. package/lib/programmers/http/HttpQueryProgrammer.js +2 -2
  45. package/lib/programmers/http/HttpQueryProgrammer.js.map +1 -1
  46. package/lib/programmers/internal/check_dynamic_key.d.ts +1 -1
  47. package/lib/programmers/json/JsonStringifyProgrammer.js +2 -2
  48. package/lib/programmers/json/JsonStringifyProgrammer.js.map +1 -1
  49. package/lib/programmers/misc/MiscCloneProgrammer.js +2 -2
  50. package/lib/programmers/misc/MiscCloneProgrammer.js.map +1 -1
  51. package/lib/programmers/misc/MiscPruneProgrammer.js +2 -2
  52. package/lib/programmers/misc/MiscPruneProgrammer.js.map +1 -1
  53. package/lib/programmers/notations/NotationGeneralProgrammer.js +2 -2
  54. package/lib/programmers/notations/NotationGeneralProgrammer.js.map +1 -1
  55. package/lib/programmers/protobuf/ProtobufDecodeProgrammer.js +2 -2
  56. package/lib/programmers/protobuf/ProtobufDecodeProgrammer.js.map +1 -1
  57. package/lib/programmers/protobuf/ProtobufEncodeProgrammer.js +2 -2
  58. package/lib/programmers/protobuf/ProtobufEncodeProgrammer.js.map +1 -1
  59. package/lib/transformers/features/functional/FunctionalGenericTransformer.d.ts +1 -1
  60. package/lib/transformers/features/functional/FunctionalGenericTransformer.js +11 -32
  61. package/lib/transformers/features/functional/FunctionalGenericTransformer.js.map +1 -1
  62. package/package.json +2 -1
  63. package/src/functional/Namespace/functional.ts +5 -0
  64. package/src/functional/Namespace/index.ts +1 -0
  65. package/src/functional.ts +258 -243
  66. package/src/programmers/AssertProgrammer.ts +1 -1
  67. package/src/programmers/CheckerProgrammer.ts +1 -1
  68. package/src/programmers/FeatureProgrammer.ts +1 -1
  69. package/src/programmers/IsProgrammer.ts +1 -1
  70. package/src/programmers/RandomProgrammer.ts +1 -1
  71. package/src/programmers/ValidateProgrammer.ts +1 -1
  72. package/src/programmers/functional/FunctionalAssertFunctionProgrammer.ts +103 -18
  73. package/src/programmers/functional/FunctionalAssertParametersProgrammer.ts +22 -45
  74. package/src/programmers/functional/FunctionalAssertReturnProgrammer.ts +44 -40
  75. package/src/programmers/helpers/FunctionImporeter.ts +1 -87
  76. package/src/programmers/helpers/FunctionImporter.ts +87 -0
  77. package/src/programmers/helpers/StringifyJoinder.ts +1 -1
  78. package/src/programmers/helpers/disable_function_importer_declare.ts +1 -1
  79. package/src/programmers/http/HttpFormDataProgrammer.ts +1 -1
  80. package/src/programmers/http/HttpHeadersProgrammer.ts +1 -1
  81. package/src/programmers/http/HttpParameterProgrammer.ts +1 -1
  82. package/src/programmers/http/HttpQueryProgrammer.ts +1 -1
  83. package/src/programmers/internal/check_dynamic_key.ts +1 -1
  84. package/src/programmers/internal/check_dynamic_properties.ts +1 -1
  85. package/src/programmers/internal/check_object.ts +1 -1
  86. package/src/programmers/internal/feature_object_entries.ts +1 -1
  87. package/src/programmers/json/JsonStringifyProgrammer.ts +1 -1
  88. package/src/programmers/misc/MiscCloneProgrammer.ts +1 -1
  89. package/src/programmers/misc/MiscPruneProgrammer.ts +1 -1
  90. package/src/programmers/notations/NotationGeneralProgrammer.ts +1 -1
  91. package/src/programmers/protobuf/ProtobufDecodeProgrammer.ts +1 -1
  92. package/src/programmers/protobuf/ProtobufEncodeProgrammer.ts +1 -1
  93. package/src/transformers/features/functional/FunctionalGenericTransformer.ts +12 -17
package/src/functional.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as Namespace from "./functional/Namespace";
2
- import { IValidation } from "./IValidation";
3
2
 
3
+ // import { IValidation } from "./IValidation";
4
4
  import { TypeGuardError } from "./TypeGuardError";
5
5
 
6
6
  /* ===========================================================
@@ -42,7 +42,7 @@ import { TypeGuardError } from "./TypeGuardError";
42
42
  *
43
43
  * @author Jeongho Nam - https://github.com/samchon
44
44
  */
45
- function assertFunction<T extends (...args: unknown[]) => unknown>(
45
+ function assertFunction<T extends (...args: any[]) => any>(
46
46
  func: T,
47
47
  errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
48
48
  ): T;
@@ -55,10 +55,12 @@ function assertFunction(): never {
55
55
  }
56
56
  const assertFunctionPure = /** @__PURE__ */ Object.assign<
57
57
  typeof assertFunction,
58
+ {},
58
59
  {}
59
60
  >(
60
61
  assertFunction,
61
62
  /** @__PURE__ */ Namespace.assert("functional.assertFunction"),
63
+ /** @__PURE__ */ Namespace.functional.functionalAssert(),
62
64
  );
63
65
  export { assertFunctionPure as assertFunction };
64
66
 
@@ -90,7 +92,7 @@ export { assertFunctionPure as assertFunction };
90
92
  *
91
93
  * @author Jeongho Nam - https://github.com/samchon
92
94
  */
93
- function assertParameters<T extends (...args: unknown[]) => unknown>(
95
+ function assertParameters<T extends (...args: any[]) => any>(
94
96
  func: T,
95
97
  errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
96
98
  ): T;
@@ -103,10 +105,12 @@ function assertParameters(): never {
103
105
  }
104
106
  const assertParametersPure = /** @__PURE__ */ Object.assign<
105
107
  typeof assertParameters,
108
+ {},
106
109
  {}
107
110
  >(
108
- assertParameters,
109
- /** @__PURE__ */ Namespace.assert("functional.assertParameters"),
111
+ assertFunction,
112
+ /** @__PURE__ */ Namespace.assert("functional.assertFunction"),
113
+ /** @__PURE__ */ Namespace.functional.functionalAssert(),
110
114
  );
111
115
  export { assertParametersPure as assertParameters };
112
116
 
@@ -138,7 +142,7 @@ export { assertParametersPure as assertParameters };
138
142
  *
139
143
  * @author Jeongho Nam - https://github.com/samchon
140
144
  */
141
- function assertReturn<T extends (...args: unknown[]) => unknown>(
145
+ function assertReturn<T extends (...args: any[]) => any>(
142
146
  func: T,
143
147
  errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
144
148
  ): T;
@@ -151,8 +155,13 @@ function assertReturn(): never {
151
155
  }
152
156
  const assertReturnPure = /** @__PURE__ */ Object.assign<
153
157
  typeof assertReturn,
158
+ {},
154
159
  {}
155
- >(assertReturn, /** @__PURE__ */ Namespace.assert("functional.assertReturn"));
160
+ >(
161
+ assertReturn,
162
+ /** @__PURE__ */ Namespace.assert("functional.assertReturn"),
163
+ /** @__PURE__ */ Namespace.functional.functionalAssert(),
164
+ );
156
165
  export { assertReturnPure as assertReturn };
157
166
 
158
167
  /**
@@ -188,7 +197,7 @@ export { assertReturnPure as assertReturn };
188
197
  *
189
198
  * @author Jeongho Nam - https://github.com/samchon
190
199
  */
191
- function assertEqualsFunction<T extends (...args: unknown[]) => unknown>(
200
+ function assertEqualsFunction<T extends (...args: any[]) => any>(
192
201
  func: T,
193
202
  errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
194
203
  ): T;
@@ -201,10 +210,12 @@ function assertEqualsFunction(): never {
201
210
  }
202
211
  const assertEqualsFunctionPure = /** @__PURE__ */ Object.assign<
203
212
  typeof assertEqualsFunction,
213
+ {},
204
214
  {}
205
215
  >(
206
216
  assertEqualsFunction,
207
217
  /** @__PURE__ */ Namespace.assert("functional.assertEqualsFunction"),
218
+ /** @__PURE__ */ Namespace.functional.functionalAssert(),
208
219
  );
209
220
  export { assertEqualsFunctionPure as assertEqualsFunction };
210
221
 
@@ -237,7 +248,7 @@ export { assertEqualsFunctionPure as assertEqualsFunction };
237
248
  *
238
249
  * @author Jeongho Nam - https://github.com/samchon
239
250
  */
240
- function assertEqualsParameters<T extends (...args: unknown[]) => unknown>(
251
+ function assertEqualsParameters<T extends (...args: any[]) => any>(
241
252
  func: T,
242
253
  errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
243
254
  ): T;
@@ -250,10 +261,12 @@ function assertEqualsParameters(): never {
250
261
  }
251
262
  const assertEqualsParametersPure = /** @__PURE__ */ Object.assign<
252
263
  typeof assertEqualsParameters,
264
+ {},
253
265
  {}
254
266
  >(
255
267
  assertEqualsParameters,
256
268
  /** @__PURE__ */ Namespace.assert("functional.assertEqualsParameters"),
269
+ /** @__PURE__ */ Namespace.functional.functionalAssert(),
257
270
  );
258
271
  export { assertEqualsParametersPure as assertEqualsParameters };
259
272
 
@@ -285,7 +298,7 @@ export { assertEqualsParametersPure as assertEqualsParameters };
285
298
  *
286
299
  * @author Jeongho Nam - https://github.com/samchon
287
300
  */
288
- function assertEqualsReturn<T extends (...args: unknown[]) => unknown>(
301
+ function assertEqualsReturn<T extends (...args: any[]) => any>(
289
302
  func: T,
290
303
  errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error),
291
304
  ): T;
@@ -298,255 +311,257 @@ function assertEqualsReturn(): never {
298
311
  }
299
312
  const assertEqualsReturnPure = /** @__PURE__ */ Object.assign<
300
313
  typeof assertEqualsReturn,
314
+ {},
301
315
  {}
302
316
  >(
303
317
  assertEqualsReturn,
304
318
  /** @__PURE__ */ Namespace.assert("functional.assertEqualsReturn"),
319
+ /** @__PURE__ */ Namespace.functional.functionalAssert(),
305
320
  );
306
321
  export { assertEqualsReturnPure as assertEqualsReturn };
307
322
 
308
- /* -----------------------------------------------------------
309
- VALIDATIONS
310
- ----------------------------------------------------------- */
311
- /**
312
- * Validates a function.
313
- *
314
- * Validates a function, by wrapping the function and checking its parameters and
315
- * return value through {@link validate} function. If some parameter or return value
316
- * does not match the expected type, it returns {@link IValidation.IError} typed
317
- * object. Otherwise there's no type error, it returns {@link IValidation.ISuccess}
318
- * typed object instead.
319
- *
320
- * For reference, {@link IValidation.IError.path} would be a little bit different with
321
- * individual {@link validate} function. If the {@link IValidation.IError} occurs from
322
- * some parameter, the path would start from `$input.parameters[number]`. Otherwise
323
- * the path would start from `$input.return`.
324
- *
325
- * - `$input.parameters[0].~`
326
- * - `$input.return.~`
327
- *
328
- * By the way, if what you want is not finding every type errors, but just finding
329
- * the 1st type error, then use {@link assertFunction} instead. Otherwise, what you
330
- * want is just validating parameters or return value only, you can use
331
- * {@link validateParameters} or {@link validateReturn} instead.
332
- *
333
- * On the other hand, if you don't want to allow any superfluous properties, utilize
334
- * {@link validateEqualsFunction} or {@link assertEqualsFunction} instead.
335
- *
336
- * @template T Target function type
337
- * @param func Target function to validate
338
- * @returns The wrapper function with type validations
339
- *
340
- * @author Jeongho Nam - https://github.com/samchon
341
- */
342
- function validateFunction<T extends (...args: unknown[]) => unknown>(
343
- func: T,
344
- ): T extends (...args: infer Arguments) => infer Output
345
- ? Output extends Promise<infer R>
346
- ? (...args: Arguments) => Promise<IValidation<R>>
347
- : (...args: Arguments) => IValidation<Output>
348
- : never;
323
+ // /* -----------------------------------------------------------
324
+ // VALIDATIONS
325
+ // ----------------------------------------------------------- */
326
+ // /**
327
+ // * Validates a function.
328
+ // *
329
+ // * Validates a function, by wrapping the function and checking its parameters and
330
+ // * return value through {@link validate} function. If some parameter or return value
331
+ // * does not match the expected type, it returns {@link IValidation.IError} typed
332
+ // * object. Otherwise there's no type error, it returns {@link IValidation.ISuccess}
333
+ // * typed object instead.
334
+ // *
335
+ // * For reference, {@link IValidation.IError.path} would be a little bit different with
336
+ // * individual {@link validate} function. If the {@link IValidation.IError} occurs from
337
+ // * some parameter, the path would start from `$input.parameters[number]`. Otherwise
338
+ // * the path would start from `$input.return`.
339
+ // *
340
+ // * - `$input.parameters[0].~`
341
+ // * - `$input.return.~`
342
+ // *
343
+ // * By the way, if what you want is not finding every type errors, but just finding
344
+ // * the 1st type error, then use {@link assertFunction} instead. Otherwise, what you
345
+ // * want is just validating parameters or return value only, you can use
346
+ // * {@link validateParameters} or {@link validateReturn} instead.
347
+ // *
348
+ // * On the other hand, if you don't want to allow any superfluous properties, utilize
349
+ // * {@link validateEqualsFunction} or {@link assertEqualsFunction} instead.
350
+ // *
351
+ // * @template T Target function type
352
+ // * @param func Target function to validate
353
+ // * @returns The wrapper function with type validations
354
+ // *
355
+ // * @author Jeongho Nam - https://github.com/samchon
356
+ // */
357
+ // function validateFunction<T extends (...args: any[]) => any>(
358
+ // func: T,
359
+ // ): T extends (...args: infer Arguments) => infer Output
360
+ // ? Output extends Promise<infer R>
361
+ // ? (...args: Arguments) => Promise<IValidation<R>>
362
+ // : (...args: Arguments) => IValidation<Output>
363
+ // : never;
349
364
 
350
- /**
351
- * @internal
352
- */
353
- function validateFunction(): never {
354
- halt("validateFunction");
355
- }
356
- const validateFunctionPure = /** @__PURE__ */ Object.assign<
357
- typeof validateFunction,
358
- {}
359
- >(validateFunction, /** @__PURE__ */ Namespace.validate());
360
- export { validateFunctionPure as validateFunction };
365
+ // /**
366
+ // * @internal
367
+ // */
368
+ // function validateFunction(): never {
369
+ // halt("validateFunction");
370
+ // }
371
+ // const validateFunctionPure = /** @__PURE__ */ Object.assign<
372
+ // typeof validateFunction,
373
+ // {}
374
+ // >(validateFunction, /** @__PURE__ */ Namespace.validate());
375
+ // export { validateFunctionPure as validateFunction };
361
376
 
362
- /**
363
- * Validates parameters.
364
- *
365
- * Validates a function, by wrapping the function and checking its parameters through
366
- * {@link validate} function. If some parameter does not match the expected type, it
367
- * returns {@link IValidation.IError} typed object. Otherwise there's no type error,
368
- * it returns {@link IValidation.ISuccess} typed object instead.
369
- *
370
- * For reference, {@link IValidation.IError.path} would be a little bit different with
371
- * individual {@link validate} function. If the {@link IValidation.IError} occurs from
372
- * some parameter, the path would start from `$input.parameters[number]`.
373
- *
374
- * By the way, if what you want is not finding every type errors, but just finding
375
- * the 1st type error, then use {@link assertParameters} instead. Otherwise, what you
376
- * want is not only validating parameters, but also validating return value, you can
377
- * use {@link validateFunction} instead.
378
- *
379
- * On the other hand, if you don't want to allow any superfluous properties, utilize
380
- * {@link validateEqualsParameters} or {@link assertEqualsParameters} instead.
381
- *
382
- * @template T Target function type
383
- * @param func Target function to validate
384
- * @returns The wrapper function with type validations
385
- *
386
- * @author Jeongho Nam - https://github.com/samchon
387
- */
388
- function validateReturn<T extends (...args: unknown[]) => unknown>(
389
- func: T,
390
- ): T extends (...args: infer Arguments) => infer Output
391
- ? Output extends Promise<infer R>
392
- ? (...args: Arguments) => Promise<IValidation<R>>
393
- : (...args: Arguments) => IValidation<Output>
394
- : never;
377
+ // /**
378
+ // * Validates parameters.
379
+ // *
380
+ // * Validates a function, by wrapping the function and checking its parameters through
381
+ // * {@link validate} function. If some parameter does not match the expected type, it
382
+ // * returns {@link IValidation.IError} typed object. Otherwise there's no type error,
383
+ // * it returns {@link IValidation.ISuccess} typed object instead.
384
+ // *
385
+ // * For reference, {@link IValidation.IError.path} would be a little bit different with
386
+ // * individual {@link validate} function. If the {@link IValidation.IError} occurs from
387
+ // * some parameter, the path would start from `$input.parameters[number]`.
388
+ // *
389
+ // * By the way, if what you want is not finding every type errors, but just finding
390
+ // * the 1st type error, then use {@link assertParameters} instead. Otherwise, what you
391
+ // * want is not only validating parameters, but also validating return value, you can
392
+ // * use {@link validateFunction} instead.
393
+ // *
394
+ // * On the other hand, if you don't want to allow any superfluous properties, utilize
395
+ // * {@link validateEqualsParameters} or {@link assertEqualsParameters} instead.
396
+ // *
397
+ // * @template T Target function type
398
+ // * @param func Target function to validate
399
+ // * @returns The wrapper function with type validations
400
+ // *
401
+ // * @author Jeongho Nam - https://github.com/samchon
402
+ // */
403
+ // function validateReturn<T extends (...args: any[]) => any>(
404
+ // func: T,
405
+ // ): T extends (...args: infer Arguments) => infer Output
406
+ // ? Output extends Promise<infer R>
407
+ // ? (...args: Arguments) => Promise<IValidation<R>>
408
+ // : (...args: Arguments) => IValidation<Output>
409
+ // : never;
395
410
 
396
- /**
397
- * @internal
398
- */
399
- function validateReturn(): never {
400
- halt("validateReturn");
401
- }
402
- const validateReturnPure = /** @__PURE__ */ Object.assign<
403
- typeof validateReturn,
404
- {}
405
- >(validateReturn, /** @__PURE__ */ Namespace.validate());
406
- export { validateReturnPure as validateReturn };
411
+ // /**
412
+ // * @internal
413
+ // */
414
+ // function validateReturn(): never {
415
+ // halt("validateReturn");
416
+ // }
417
+ // const validateReturnPure = /** @__PURE__ */ Object.assign<
418
+ // typeof validateReturn,
419
+ // {}
420
+ // >(validateReturn, /** @__PURE__ */ Namespace.validate());
421
+ // export { validateReturnPure as validateReturn };
407
422
 
408
- /**
409
- * Validates a function with strict equality.
410
- *
411
- * Validates a function with strict equality, by wrapping the function and checking
412
- * its parameters and return value through {@link validateEquals} function. If some
413
- * parameter or return value does not match the expected type, it returns
414
- * {@link IValidation.IError} typed object. Otherwise there's no type error, it
415
- * returns {@link IValidation.ISuccess} typed object instead.
416
- *
417
- * For reference, {@link IValidation.IError.path} would be a little bit different with
418
- * individual {@link validateEquals} function. If the {@link IValidation.IError} occurs
419
- * from some parameter, the path would start from `$input.parameters[number]`. Otherwise
420
- * the path would start from `$input.return`.
421
- *
422
- * - `$input.parameters[0].~`
423
- * - `$input.return.~`
424
- *
425
- * By the way, if what you want is not finding every type errors, but just finding
426
- * the 1st type error, then use {@link assertEqualsFunction} instead. Otherwise, what
427
- * you want is just validating parameters or return value only, you can use
428
- * {@link validateEqualsParameters} or {@link validateEqualsReturn} instead.
429
- *
430
- * On the other hand, if you want to allow any superfluous properties, utilize
431
- * {@link validateFunction} or {@link assertFunction} instead.
432
- *
433
- * @template T Target function type
434
- * @param func Target function to validate
435
- * @returns The wrapper function with type validations
436
- *
437
- * @author Jeongho Nam - https://github.com/samchon
438
- */
439
- function validateEqualsFunction<T extends (...args: unknown[]) => unknown>(
440
- func: T,
441
- ): T extends (...args: infer Arguments) => infer Output
442
- ? Output extends Promise<infer R>
443
- ? (...args: Arguments) => Promise<IValidation<R>>
444
- : (...args: Arguments) => IValidation<Output>
445
- : never;
423
+ // /**
424
+ // * Validates a function with strict equality.
425
+ // *
426
+ // * Validates a function with strict equality, by wrapping the function and checking
427
+ // * its parameters and return value through {@link validateEquals} function. If some
428
+ // * parameter or return value does not match the expected type, it returns
429
+ // * {@link IValidation.IError} typed object. Otherwise there's no type error, it
430
+ // * returns {@link IValidation.ISuccess} typed object instead.
431
+ // *
432
+ // * For reference, {@link IValidation.IError.path} would be a little bit different with
433
+ // * individual {@link validateEquals} function. If the {@link IValidation.IError} occurs
434
+ // * from some parameter, the path would start from `$input.parameters[number]`. Otherwise
435
+ // * the path would start from `$input.return`.
436
+ // *
437
+ // * - `$input.parameters[0].~`
438
+ // * - `$input.return.~`
439
+ // *
440
+ // * By the way, if what you want is not finding every type errors, but just finding
441
+ // * the 1st type error, then use {@link assertEqualsFunction} instead. Otherwise, what
442
+ // * you want is just validating parameters or return value only, you can use
443
+ // * {@link validateEqualsParameters} or {@link validateEqualsReturn} instead.
444
+ // *
445
+ // * On the other hand, if you want to allow any superfluous properties, utilize
446
+ // * {@link validateFunction} or {@link assertFunction} instead.
447
+ // *
448
+ // * @template T Target function type
449
+ // * @param func Target function to validate
450
+ // * @returns The wrapper function with type validations
451
+ // *
452
+ // * @author Jeongho Nam - https://github.com/samchon
453
+ // */
454
+ // function validateEqualsFunction<T extends (...args: any[]) => any>(
455
+ // func: T,
456
+ // ): T extends (...args: infer Arguments) => infer Output
457
+ // ? Output extends Promise<infer R>
458
+ // ? (...args: Arguments) => Promise<IValidation<R>>
459
+ // : (...args: Arguments) => IValidation<Output>
460
+ // : never;
446
461
 
447
- /**
448
- * @internal
449
- */
450
- function validateEqualsFunction(): never {
451
- halt("validateEqualsFunction");
452
- }
453
- const validateEqualsFunctionPure = /** @__PURE__ */ Object.assign<
454
- typeof validateEqualsFunction,
455
- {}
456
- >(validateEqualsFunction, /** @__PURE__ */ Namespace.validate());
457
- export { validateEqualsFunctionPure as validateEqualsFunction };
462
+ // /**
463
+ // * @internal
464
+ // */
465
+ // function validateEqualsFunction(): never {
466
+ // halt("validateEqualsFunction");
467
+ // }
468
+ // const validateEqualsFunctionPure = /** @__PURE__ */ Object.assign<
469
+ // typeof validateEqualsFunction,
470
+ // {}
471
+ // >(validateEqualsFunction, /** @__PURE__ */ Namespace.validate());
472
+ // export { validateEqualsFunctionPure as validateEqualsFunction };
458
473
 
459
- /**
460
- * Validates parameters with strict equality.
461
- *
462
- * Validates a function, by wrapping the function and checking its parameters through
463
- * {@link validateEquals} function. If some parameter does not match the expected type,
464
- * it returns {@link IValidation.IError} typed object. Otherwise there's no type error,
465
- * it returns {@link IValidation.ISuccess} typed object instead.
466
- *
467
- * For reference, {@link IValidation.IError.path} would be a little bit different with
468
- * individual {@link validateEquals} function. If the {@link IValidation.IError} occurs
469
- * from some parameter, the path would start from `$input.parameters[number]`.
470
- *
471
- * By the way, if what you want is not finding every type errors, but just finding
472
- * the 1st type error, then use {@link assertEqualsParameters} instead. Otherwise,
473
- * what you want is not only validating parameters, but also validating return value,
474
- * you can use {@link validateEqualsFunction} instead.
475
- *
476
- * On the other hand, if you want to allow any superfluous properties, utilize
477
- * {@link validateParameters} or {@link assertParameters} instead.
478
- *
479
- * @template T Target function type
480
- * @param func Target function to validate
481
- * @returns The wrapper function with type validations
482
- *
483
- * @author Jeongho Nam - https://github.com/samchon
484
- */
485
- function validateEqualsParameters<T extends (...args: unknown[]) => unknown>(
486
- func: T,
487
- ): T extends (...args: infer Arguments) => infer Output
488
- ? Output extends Promise<infer R>
489
- ? (...args: Arguments) => Promise<IValidation<R>>
490
- : (...args: Arguments) => IValidation<Output>
491
- : never;
474
+ // /**
475
+ // * Validates parameters with strict equality.
476
+ // *
477
+ // * Validates a function, by wrapping the function and checking its parameters through
478
+ // * {@link validateEquals} function. If some parameter does not match the expected type,
479
+ // * it returns {@link IValidation.IError} typed object. Otherwise there's no type error,
480
+ // * it returns {@link IValidation.ISuccess} typed object instead.
481
+ // *
482
+ // * For reference, {@link IValidation.IError.path} would be a little bit different with
483
+ // * individual {@link validateEquals} function. If the {@link IValidation.IError} occurs
484
+ // * from some parameter, the path would start from `$input.parameters[number]`.
485
+ // *
486
+ // * By the way, if what you want is not finding every type errors, but just finding
487
+ // * the 1st type error, then use {@link assertEqualsParameters} instead. Otherwise,
488
+ // * what you want is not only validating parameters, but also validating return value,
489
+ // * you can use {@link validateEqualsFunction} instead.
490
+ // *
491
+ // * On the other hand, if you want to allow any superfluous properties, utilize
492
+ // * {@link validateParameters} or {@link assertParameters} instead.
493
+ // *
494
+ // * @template T Target function type
495
+ // * @param func Target function to validate
496
+ // * @returns The wrapper function with type validations
497
+ // *
498
+ // * @author Jeongho Nam - https://github.com/samchon
499
+ // */
500
+ // function validateEqualsParameters<T extends (...args: any[]) => any>(
501
+ // func: T,
502
+ // ): T extends (...args: infer Arguments) => infer Output
503
+ // ? Output extends Promise<infer R>
504
+ // ? (...args: Arguments) => Promise<IValidation<R>>
505
+ // : (...args: Arguments) => IValidation<Output>
506
+ // : never;
492
507
 
493
- /**
494
- * @internal
495
- */
496
- function validateEqualsParameters(): never {
497
- halt("validateEqualsParameters");
498
- }
499
- const validateEqualsParametersPure = /** @__PURE__ */ Object.assign<
500
- typeof validateEqualsParameters,
501
- {}
502
- >(validateEqualsParameters, /** @__PURE__ */ Namespace.validate());
503
- export { validateEqualsParametersPure as validateEqualsParameters };
508
+ // /**
509
+ // * @internal
510
+ // */
511
+ // function validateEqualsParameters(): never {
512
+ // halt("validateEqualsParameters");
513
+ // }
514
+ // const validateEqualsParametersPure = /** @__PURE__ */ Object.assign<
515
+ // typeof validateEqualsParameters,
516
+ // {}
517
+ // >(validateEqualsParameters, /** @__PURE__ */ Namespace.validate());
518
+ // export { validateEqualsParametersPure as validateEqualsParameters };
504
519
 
505
- /**
506
- * Validates return value with strict equality.
507
- *
508
- * Validates a function, by wrapping the function and checking its return value through
509
- * {@link validateEquals} function. If the return value does not match the expected type,
510
- * it returns {@link IValidation.IError} typed object. Otherwise there's no type error,
511
- * it returns {@link IValidation.ISuccess} typed object instead.
512
- *
513
- * For reference, {@link IValidation.IError.path} would be a little bit different with
514
- * individual {@link validateEquals} function. If the {@link IValidation.IError} occurs
515
- * from the return value, the path would start from `$input.return`.
516
- *
517
- * By the way, if what you want is not finding every type errors, but just finding
518
- * the 1st type error, then use {@link assertEqualsReturn} instead. Otherwise, what you
519
- * want is not only validating return value, but also validating parameters, you can use
520
- * {@link validateEqualsFunction} instead.
521
- *
522
- * On the other hand, if you want to allow any superfluous properties, utilize
523
- * {@link validateReturn} or {@link assertReturn} instead.
524
- *
525
- * @template T Target function type
526
- * @param func Target function to validate
527
- * @returns The wrapper function with type validations
528
- *
529
- * @author Jeongho Nam - https://github.com/samchon
530
- */
531
- function validateEqualsReturn<T extends (...args: unknown[]) => unknown>(
532
- func: T,
533
- ): T extends (...args: infer Arguments) => infer Output
534
- ? Output extends Promise<infer R>
535
- ? (...args: Arguments) => Promise<IValidation<R>>
536
- : (...args: Arguments) => IValidation<Output>
537
- : never;
520
+ // /**
521
+ // * Validates return value with strict equality.
522
+ // *
523
+ // * Validates a function, by wrapping the function and checking its return value through
524
+ // * {@link validateEquals} function. If the return value does not match the expected type,
525
+ // * it returns {@link IValidation.IError} typed object. Otherwise there's no type error,
526
+ // * it returns {@link IValidation.ISuccess} typed object instead.
527
+ // *
528
+ // * For reference, {@link IValidation.IError.path} would be a little bit different with
529
+ // * individual {@link validateEquals} function. If the {@link IValidation.IError} occurs
530
+ // * from the return value, the path would start from `$input.return`.
531
+ // *
532
+ // * By the way, if what you want is not finding every type errors, but just finding
533
+ // * the 1st type error, then use {@link assertEqualsReturn} instead. Otherwise, what you
534
+ // * want is not only validating return value, but also validating parameters, you can use
535
+ // * {@link validateEqualsFunction} instead.
536
+ // *
537
+ // * On the other hand, if you want to allow any superfluous properties, utilize
538
+ // * {@link validateReturn} or {@link assertReturn} instead.
539
+ // *
540
+ // * @template T Target function type
541
+ // * @param func Target function to validate
542
+ // * @returns The wrapper function with type validations
543
+ // *
544
+ // * @author Jeongho Nam - https://github.com/samchon
545
+ // */
546
+ // function validateEqualsReturn<T extends (...args: any[]) => any>(
547
+ // func: T,
548
+ // ): T extends (...args: infer Arguments) => infer Output
549
+ // ? Output extends Promise<infer R>
550
+ // ? (...args: Arguments) => Promise<IValidation<R>>
551
+ // : (...args: Arguments) => IValidation<Output>
552
+ // : never;
538
553
 
539
- /**
540
- * @internal
541
- */
542
- function validateEqualsReturn(): never {
543
- halt("validateEqualsReturn");
544
- }
545
- const validateEqualsReturnPure = /** @__PURE__ */ Object.assign<
546
- typeof validateEqualsReturn,
547
- {}
548
- >(validateEqualsReturn, /** @__PURE__ */ Namespace.validate());
549
- export { validateEqualsReturnPure as validateEqualsReturn };
554
+ // /**
555
+ // * @internal
556
+ // */
557
+ // function validateEqualsReturn(): never {
558
+ // halt("validateEqualsReturn");
559
+ // }
560
+ // const validateEqualsReturnPure = /** @__PURE__ */ Object.assign<
561
+ // typeof validateEqualsReturn,
562
+ // {}
563
+ // >(validateEqualsReturn, /** @__PURE__ */ Namespace.validate());
564
+ // export { validateEqualsReturnPure as validateEqualsReturn };
550
565
 
551
566
  /* -----------------------------------------------------------
552
567
  HALTER
@@ -8,7 +8,7 @@ import { IProject } from "../transformers/IProject";
8
8
 
9
9
  import { CheckerProgrammer } from "./CheckerProgrammer";
10
10
  import { IsProgrammer } from "./IsProgrammer";
11
- import { FunctionImporter } from "./helpers/FunctionImporeter";
11
+ import { FunctionImporter } from "./helpers/FunctionImporter";
12
12
  import { OptionPredicator } from "./helpers/OptionPredicator";
13
13
  import { check_object } from "./internal/check_object";
14
14
 
@@ -19,7 +19,7 @@ import { TransformerError } from "../transformers/TransformerError";
19
19
 
20
20
  import { FeatureProgrammer } from "./FeatureProgrammer";
21
21
  import { AtomicPredicator } from "./helpers/AtomicPredicator";
22
- import { FunctionImporter } from "./helpers/FunctionImporeter";
22
+ import { FunctionImporter } from "./helpers/FunctionImporter";
23
23
  import { ICheckEntry } from "./helpers/ICheckEntry";
24
24
  import { IExpressionEntry } from "./helpers/IExpressionEntry";
25
25
  import { OptionPredicator } from "./helpers/OptionPredicator";
@@ -13,7 +13,7 @@ import { MetadataObject } from "../schemas/metadata/MetadataObject";
13
13
  import { IProject } from "../transformers/IProject";
14
14
 
15
15
  import { CheckerProgrammer } from "./CheckerProgrammer";
16
- import { FunctionImporter } from "./helpers/FunctionImporeter";
16
+ import { FunctionImporter } from "./helpers/FunctionImporter";
17
17
  import { IExpressionEntry } from "./helpers/IExpressionEntry";
18
18
  import { UnionExplorer } from "./helpers/UnionExplorer";
19
19
  import { feature_object_entries } from "./internal/feature_object_entries";