typia 9.6.1 → 9.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/CamelCase.d.mts +1 -1
- package/lib/CamelCase.d.ts +1 -1
- package/lib/IRandomGenerator.d.mts +240 -0
- package/lib/IRandomGenerator.d.ts +240 -0
- package/lib/PascalCase.d.mts +1 -1
- package/lib/PascalCase.d.ts +1 -1
- package/lib/Primitive.d.mts +8 -8
- package/lib/Primitive.d.ts +8 -8
- package/lib/Resolved.d.mts +9 -9
- package/lib/Resolved.d.ts +9 -9
- package/lib/SnakeCase.d.mts +1 -1
- package/lib/SnakeCase.d.ts +1 -1
- package/lib/factories/TypeFactory.d.mts +1 -0
- package/lib/factories/TypeFactory.d.ts +1 -0
- package/lib/factories/TypeFactory.js +1 -1
- package/lib/factories/TypeFactory.js.map +1 -1
- package/lib/factories/TypeFactory.mjs +1 -1
- package/lib/factories/internal/metadata/iterate_metadata_map.js +2 -3
- package/lib/factories/internal/metadata/iterate_metadata_map.js.map +1 -1
- package/lib/factories/internal/metadata/iterate_metadata_map.mjs +2 -3
- package/lib/factories/internal/metadata/iterate_metadata_set.js +2 -3
- package/lib/factories/internal/metadata/iterate_metadata_set.js.map +1 -1
- package/lib/factories/internal/metadata/iterate_metadata_set.mjs +2 -3
- package/lib/functional.js +1 -1
- package/lib/functional.js.map +1 -1
- package/lib/functional.mjs +1 -1
- package/lib/http.d.mts +23 -23
- package/lib/http.d.ts +23 -23
- package/lib/internal/_llmApplicationFinalize.d.mts +1 -1
- package/lib/internal/_llmApplicationFinalize.d.ts +1 -1
- package/lib/internal/_llmApplicationFinalize.js +14 -11
- package/lib/internal/_llmApplicationFinalize.js.map +1 -1
- package/lib/internal/_llmApplicationFinalize.mjs +13 -9
- package/lib/json.d.mts +16 -16
- package/lib/json.d.ts +16 -16
- package/lib/llm.d.mts +18 -18
- package/lib/llm.d.ts +18 -18
- package/lib/llm.js.map +1 -1
- package/lib/misc.d.mts +23 -23
- package/lib/misc.d.ts +23 -23
- package/lib/module.d.mts +75 -75
- package/lib/module.d.ts +75 -75
- package/lib/module.js.map +1 -1
- package/lib/transformers/features/llm/LlmApplicationTransformer.js +8 -9
- package/lib/transformers/features/llm/LlmApplicationTransformer.js.map +1 -1
- package/lib/transformers/features/llm/LlmApplicationTransformer.mjs +8 -9
- package/package.json +2 -2
- package/src/CamelCase.ts +1 -1
- package/src/IRandomGenerator.ts +284 -6
- package/src/PascalCase.ts +1 -1
- package/src/Primitive.ts +8 -8
- package/src/Resolved.ts +9 -9
- package/src/SnakeCase.ts +1 -1
- package/src/factories/TypeFactory.ts +5 -3
- package/src/factories/internal/metadata/iterate_metadata_map.ts +3 -3
- package/src/factories/internal/metadata/iterate_metadata_set.ts +2 -3
- package/src/functional.ts +1 -1
- package/src/http.ts +23 -23
- package/src/internal/_llmApplicationFinalize.ts +25 -11
- package/src/json.ts +16 -16
- package/src/llm.ts +26 -18
- package/src/misc.ts +23 -23
- package/src/module.ts +76 -75
- package/src/transformers/features/llm/LlmApplicationTransformer.ts +18 -22
package/lib/llm.d.ts
CHANGED
|
@@ -57,7 +57,7 @@ import { ILlmApplication, ILlmController, ILlmSchema } from "@samchon/openapi";
|
|
|
57
57
|
* - `deepseek`: [`IDeepSeekSchema`](https://samchon.github.io/openapi/api/types/IClaudeSchema-1.html)
|
|
58
58
|
* - `gemini`: [`IGeminiSchema`](https://samchon.github.io/openapi/api/types/IGeminiSchema-1.html)
|
|
59
59
|
* - `llama`: [`ILlamaSchema`](https://samchon.github.io/openapi/api/types/ILlamaSchema-1.html)
|
|
60
|
-
* -
|
|
60
|
+
* - Middle layer schemas
|
|
61
61
|
* - `3.0`: [`ILlmSchemaV3`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3-1.html)
|
|
62
62
|
* - `3.1`: [`ILlmSchemaV3_1`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3_1-1.html)
|
|
63
63
|
*
|
|
@@ -71,7 +71,7 @@ import { ILlmApplication, ILlmController, ILlmSchema } from "@samchon/openapi";
|
|
|
71
71
|
* @reference https://wrtnlabs.io/agentica/docs/core/controller/typescript/
|
|
72
72
|
* @author Jeongho Nam - https://github.com/samchon
|
|
73
73
|
*/
|
|
74
|
-
export declare function controller(name: string, execute: object, options?: Partial<Pick<ILlmApplication.IOptions<any>, "separate">>): never;
|
|
74
|
+
export declare function controller(name: string, execute: object, options?: Partial<Pick<ILlmApplication.IOptions<any, any>, "separate" | "validate">>): never;
|
|
75
75
|
/**
|
|
76
76
|
* TypeScript functions to LLM function calling controller.
|
|
77
77
|
*
|
|
@@ -128,7 +128,7 @@ export declare function controller(name: string, execute: object, options?: Part
|
|
|
128
128
|
* - `deepseek`: [`IDeepSeekSchema`](https://samchon.github.io/openapi/api/types/IClaudeSchema-1.html)
|
|
129
129
|
* - `gemini`: [`IGeminiSchema`](https://samchon.github.io/openapi/api/types/IGeminiSchema-1.html)
|
|
130
130
|
* - `llama`: [`ILlamaSchema`](https://samchon.github.io/openapi/api/types/ILlamaSchema-1.html)
|
|
131
|
-
* -
|
|
131
|
+
* - Middle layer schemas
|
|
132
132
|
* - `3.0`: [`ILlmSchemaV3`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3-1.html)
|
|
133
133
|
* - `3.1`: [`ILlmSchemaV3_1`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3_1-1.html)
|
|
134
134
|
*
|
|
@@ -153,7 +153,7 @@ export declare function controller<Class extends Record<string, any>, Model exte
|
|
|
153
153
|
* @default false
|
|
154
154
|
*/
|
|
155
155
|
equals: boolean;
|
|
156
|
-
}> = {}>(name: string, execute: Class, options?: Partial<Pick<ILlmApplication.IOptions<Model>, "separate">>): ILlmController<Model>;
|
|
156
|
+
}> = {}>(name: string, execute: Class, options?: Partial<Pick<ILlmApplication.IOptions<Model, Class>, "separate" | "validate">>): ILlmController<Model>;
|
|
157
157
|
/**
|
|
158
158
|
* > You must configure the generic argument `Class`.
|
|
159
159
|
*
|
|
@@ -183,7 +183,7 @@ export declare function controller<Class extends Record<string, any>, Model exte
|
|
|
183
183
|
*
|
|
184
184
|
* Additionally, if you've configured {@link ILlmApplication.IOptions.separate},
|
|
185
185
|
* so that the parameters are separated to human and LLM sides, you can merge these
|
|
186
|
-
*
|
|
186
|
+
* human and LLM sides' parameters into one through {@link HttpLlm.mergeParameters}
|
|
187
187
|
* before the actual LLM function call execution.
|
|
188
188
|
*
|
|
189
189
|
* Here is the list of available `Model` types with their corresponding LLM schema.
|
|
@@ -196,7 +196,7 @@ export declare function controller<Class extends Record<string, any>, Model exte
|
|
|
196
196
|
* - `deepseek`: [`IDeepSeekSchema`](https://samchon.github.io/openapi/api/types/IClaudeSchema-1.html)
|
|
197
197
|
* - `gemini`: [`IGeminiSchema`](https://samchon.github.io/openapi/api/types/IGeminiSchema-1.html)
|
|
198
198
|
* - `llama`: [`ILlamaSchema`](https://samchon.github.io/openapi/api/types/ILlamaSchema-1.html)
|
|
199
|
-
* -
|
|
199
|
+
* - Middle layer schemas
|
|
200
200
|
* - `3.0`: [`ILlmSchemaV3`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3-1.html)
|
|
201
201
|
* - `3.1`: [`ILlmSchemaV3_1`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3_1-1.html)
|
|
202
202
|
*
|
|
@@ -208,7 +208,7 @@ export declare function controller<Class extends Record<string, any>, Model exte
|
|
|
208
208
|
* @reference https://platform.openai.com/docs/guides/function-calling
|
|
209
209
|
* @author Jeongho Nam - https://github.com/samchon
|
|
210
210
|
*/
|
|
211
|
-
export declare function application(options?: Partial<Pick<ILlmApplication.IOptions<any>, "separate">>): never;
|
|
211
|
+
export declare function application(options?: Partial<Pick<ILlmApplication.IOptions<any, any>, "separate" | "validate">>): never;
|
|
212
212
|
/**
|
|
213
213
|
* TypeScript functions to LLM function calling application.
|
|
214
214
|
*
|
|
@@ -236,7 +236,7 @@ export declare function application(options?: Partial<Pick<ILlmApplication.IOpti
|
|
|
236
236
|
*
|
|
237
237
|
* Additionally, if you've configured {@link ILlmApplication.IOptions.separate},
|
|
238
238
|
* so that the parameters are separated to human and LLM sides, you can merge these
|
|
239
|
-
*
|
|
239
|
+
* human and LLM sides' parameters into one through {@link HttpLlm.mergeParameters}
|
|
240
240
|
* before the actual LLM function call execution.
|
|
241
241
|
*
|
|
242
242
|
* Here is the list of available `Model` types with their corresponding LLM schema.
|
|
@@ -249,7 +249,7 @@ export declare function application(options?: Partial<Pick<ILlmApplication.IOpti
|
|
|
249
249
|
* - `deepseek`: [`IDeepSeekSchema`](https://samchon.github.io/openapi/api/types/IClaudeSchema-1.html)
|
|
250
250
|
* - `gemini`: [`IGeminiSchema`](https://samchon.github.io/openapi/api/types/IGeminiSchema-1.html)
|
|
251
251
|
* - `llama`: [`ILlamaSchema`](https://samchon.github.io/openapi/api/types/ILlamaSchema-1.html)
|
|
252
|
-
* -
|
|
252
|
+
* - Middle layer schemas
|
|
253
253
|
* - `3.0`: [`ILlmSchemaV3`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3-1.html)
|
|
254
254
|
* - `3.1`: [`ILlmSchemaV3_1`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3_1-1.html)
|
|
255
255
|
*
|
|
@@ -272,7 +272,7 @@ export declare function application<Class extends Record<string, any>, Model ext
|
|
|
272
272
|
* @default false
|
|
273
273
|
*/
|
|
274
274
|
equals: boolean;
|
|
275
|
-
} & ILlmSchema.ModelConfig[Model]> = {}>(options?: Partial<Pick<ILlmApplication.IOptions<Model>, "separate">>): ILlmApplication<Model, Class>;
|
|
275
|
+
} & ILlmSchema.ModelConfig[Model]> = {}>(options?: Partial<Pick<ILlmApplication.IOptions<Model, Class>, "separate" | "validate">>): ILlmApplication<Model, Class>;
|
|
276
276
|
/**
|
|
277
277
|
* > You must configure the generic argument `Parameters`.
|
|
278
278
|
*
|
|
@@ -285,7 +285,7 @@ export declare function application<Class extends Record<string, any>, Model ext
|
|
|
285
285
|
*
|
|
286
286
|
* For references, LLM identifies only keyworded arguments, not positional arguments.
|
|
287
287
|
* Therefore, the TypeScript parameters type must be an object type, and its properties
|
|
288
|
-
* must be static. If dynamic properties are, it
|
|
288
|
+
* must be static. If dynamic properties are, it will be compilation error.
|
|
289
289
|
*
|
|
290
290
|
* Also, such parameters type can be utilized not only for the LLM function calling,
|
|
291
291
|
* but also for the LLM structured outputs. The LLM structured outputs is a feature
|
|
@@ -303,7 +303,7 @@ export declare function application<Class extends Record<string, any>, Model ext
|
|
|
303
303
|
* - `deepseek`: [`IDeepSeekSchema`](https://samchon.github.io/openapi/api/types/IClaudeSchema-1.html)
|
|
304
304
|
* - `gemini`: [`IGeminiSchema`](https://samchon.github.io/openapi/api/types/IGeminiSchema-1.html)
|
|
305
305
|
* - `llama`: [`ILlamaSchema`](https://samchon.github.io/openapi/api/types/ILlamaSchema-1.html)
|
|
306
|
-
* -
|
|
306
|
+
* - Middle layer schemas
|
|
307
307
|
* - `3.0`: [`ILlmSchemaV3`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3-1.html)
|
|
308
308
|
* - `3.1`: [`ILlmSchemaV3_1`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3_1-1.html)
|
|
309
309
|
*
|
|
@@ -325,7 +325,7 @@ export declare function parameters(): never;
|
|
|
325
325
|
*
|
|
326
326
|
* For references, LLM identifies only keyworded arguments, not positional arguments.
|
|
327
327
|
* Therefore, the TypeScript parameters type must be an object type, and its properties
|
|
328
|
-
* must be static. If dynamic properties are, it
|
|
328
|
+
* must be static. If dynamic properties are, it will be compilation error.
|
|
329
329
|
*
|
|
330
330
|
* Also, such parameters type can be utilized not only for the LLM function calling,
|
|
331
331
|
* but also for the LLM structured outputs. The LLM structured outputs is a feature
|
|
@@ -343,7 +343,7 @@ export declare function parameters(): never;
|
|
|
343
343
|
* - `deepseek`: [`IDeepSeekSchema`](https://samchon.github.io/openapi/api/types/IClaudeSchema-1.html)
|
|
344
344
|
* - `gemini`: [`IGeminiSchema`](https://samchon.github.io/openapi/api/types/IGeminiSchema-1.html)
|
|
345
345
|
* - `llama`: [`ILlamaSchema`](https://samchon.github.io/openapi/api/types/ILlamaSchema-1.html)
|
|
346
|
-
* -
|
|
346
|
+
* - Middle layer schemas
|
|
347
347
|
* - `3.0`: [`ILlmSchemaV3`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3-1.html)
|
|
348
348
|
* - `3.1`: [`ILlmSchemaV3_1`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3_1-1.html)
|
|
349
349
|
*
|
|
@@ -364,7 +364,7 @@ export declare function parameters<Parameters extends Record<string, any>, Model
|
|
|
364
364
|
* [LLM function calling](@reference https://platform.openai.com/docs/guides/function-calling),
|
|
365
365
|
* from a TypeScript type.
|
|
366
366
|
*
|
|
367
|
-
* The returned {@link ILlmSchema} type
|
|
367
|
+
* The returned {@link ILlmSchema} type will be specified by the `Model` argument,
|
|
368
368
|
* and here is the list of available `Model` types with their corresponding LLM schema.
|
|
369
369
|
* Reading the following list, and determine the `Model` type considering the
|
|
370
370
|
* characteristics of the target LLM provider.
|
|
@@ -375,7 +375,7 @@ export declare function parameters<Parameters extends Record<string, any>, Model
|
|
|
375
375
|
* - `deepseek`: [`IDeepSeekSchema`](https://samchon.github.io/openapi/api/types/IClaudeSchema-1.html)
|
|
376
376
|
* - `gemini`: [`IGeminiSchema`](https://samchon.github.io/openapi/api/types/IGeminiSchema-1.html)
|
|
377
377
|
* - `llama`: [`ILlamaSchema`](https://samchon.github.io/openapi/api/types/ILlamaSchema-1.html)
|
|
378
|
-
* -
|
|
378
|
+
* - Middle layer schemas
|
|
379
379
|
* - `3.0`: [`ILlmSchemaV3`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3-1.html)
|
|
380
380
|
* - `3.1`: [`ILlmSchemaV3_1`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3_1-1.html)
|
|
381
381
|
*
|
|
@@ -413,7 +413,7 @@ export declare function schema(): never;
|
|
|
413
413
|
* [LLM function calling](@reference https://platform.openai.com/docs/guides/function-calling),
|
|
414
414
|
* from a TypeScript type.
|
|
415
415
|
*
|
|
416
|
-
* The returned {@link ILlmSchema} type
|
|
416
|
+
* The returned {@link ILlmSchema} type will be specified by the `Model` argument,
|
|
417
417
|
* and here is the list of available `Model` types with their corresponding LLM schema:
|
|
418
418
|
*
|
|
419
419
|
* - LLM provider schemas
|
|
@@ -422,7 +422,7 @@ export declare function schema(): never;
|
|
|
422
422
|
* - `deepseek`: [`IDeepSeekSchema`](https://samchon.github.io/openapi/api/types/IClaudeSchema-1.html)
|
|
423
423
|
* - `gemini`: [`IGeminiSchema`](https://samchon.github.io/openapi/api/types/IGeminiSchema-1.html)
|
|
424
424
|
* - `llama`: [`ILlamaSchema`](https://samchon.github.io/openapi/api/types/ILlamaSchema-1.html)
|
|
425
|
-
* -
|
|
425
|
+
* - Middle layer schemas
|
|
426
426
|
* - `3.0`: [`ILlmSchemaV3`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3-1.html)
|
|
427
427
|
* - `3.1`: [`ILlmSchemaV3_1`](https://samchon.github.io/openapi/api/types/ILlmSchemaV3_1-1.html)
|
|
428
428
|
*
|
package/lib/llm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm.js","sourceRoot":"","sources":["../src/llm.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"llm.js","sourceRoot":"","sources":["../src/llm.ts"],"names":[],"mappings":";;AAsLA,gCAEC;AA4ID,kCAEC;AA6FD,gCAEC;AAoHD,wBAEC;AAzhBD,gGAA6F;AAiL7F;;GAEG;AACH,SAAgB,UAAU,CAAC,GAAG,KAAY;IACxC,IAAA,6DAA6B,EAAC,gBAAgB,CAAC,CAAC;AAClD,CAAC;AAyID;;GAEG;AACH,SAAgB,WAAW;IACzB,IAAA,6DAA6B,EAAC,iBAAiB,CAAC,CAAC;AACnD,CAAC;AA0FD;;GAEG;AACH,SAAgB,UAAU;IACxB,IAAA,6DAA6B,EAAC,gBAAgB,CAAC,CAAC;AAClD,CAAC;AAiHD;;GAEG;AACH,SAAgB,MAAM;IACpB,IAAA,6DAA6B,EAAC,YAAY,CAAC,CAAC;AAC9C,CAAC"}
|
package/lib/misc.d.mts
CHANGED
|
@@ -35,7 +35,7 @@ export declare function literals(): never;
|
|
|
35
35
|
*/
|
|
36
36
|
export declare function literals<T extends Atomic.Type | null>(): T[];
|
|
37
37
|
/**
|
|
38
|
-
* Clone
|
|
38
|
+
* Clone data.
|
|
39
39
|
*
|
|
40
40
|
* Clones an instance following type `T`. If the target *input* value or its member
|
|
41
41
|
* variable contains a class instance having methods, those methods would not be
|
|
@@ -54,7 +54,7 @@ export declare function literals<T extends Atomic.Type | null>(): T[];
|
|
|
54
54
|
*/
|
|
55
55
|
export declare function clone<T>(input: T): Resolved<T>;
|
|
56
56
|
/**
|
|
57
|
-
* Clone
|
|
57
|
+
* Clone data with type assertion.
|
|
58
58
|
*
|
|
59
59
|
* Clones an instance following type `T`, with type assertion. If the target `input`
|
|
60
60
|
* value or its member variable contains a class instance having methods, those
|
|
@@ -73,7 +73,7 @@ export declare function clone<T>(input: T): Resolved<T>;
|
|
|
73
73
|
*/
|
|
74
74
|
export declare function assertClone<T>(input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): Resolved<T>;
|
|
75
75
|
/**
|
|
76
|
-
* Clone
|
|
76
|
+
* Clone data with type assertion.
|
|
77
77
|
*
|
|
78
78
|
* Clones an instance following type `T`, with type assertion. If the target `input`
|
|
79
79
|
* value or its member variable contains a class instance having methods, those
|
|
@@ -92,7 +92,7 @@ export declare function assertClone<T>(input: T, errorFactory?: undefined | ((pr
|
|
|
92
92
|
*/
|
|
93
93
|
export declare function assertClone<T>(input: unknown, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): Resolved<T>;
|
|
94
94
|
/**
|
|
95
|
-
* Clone
|
|
95
|
+
* Clone data with type checking.
|
|
96
96
|
*
|
|
97
97
|
* Clones an instance following type `T`, with type checking. If the target `input`
|
|
98
98
|
* value or its member variable contains a class instance having methods, those
|
|
@@ -110,7 +110,7 @@ export declare function assertClone<T>(input: unknown, errorFactory?: undefined
|
|
|
110
110
|
*/
|
|
111
111
|
export declare function isClone<T>(input: T): Resolved<T> | null;
|
|
112
112
|
/**
|
|
113
|
-
* Clone
|
|
113
|
+
* Clone data with type checking.
|
|
114
114
|
*
|
|
115
115
|
* Clones an instance following type `T`, with type checking. If the target `input`
|
|
116
116
|
* value or its member variable contains a class instance having methods, those
|
|
@@ -128,7 +128,7 @@ export declare function isClone<T>(input: T): Resolved<T> | null;
|
|
|
128
128
|
*/
|
|
129
129
|
export declare function isClone<T>(input: unknown): Resolved<T> | null;
|
|
130
130
|
/**
|
|
131
|
-
* Clone
|
|
131
|
+
* Clone data with detailed type validation.
|
|
132
132
|
*
|
|
133
133
|
* Clones an instance following type `T`, with detailed type validation. If the target
|
|
134
134
|
* `input` value or its member variable contains a class instance having methods,
|
|
@@ -145,7 +145,7 @@ export declare function isClone<T>(input: unknown): Resolved<T> | null;
|
|
|
145
145
|
*/
|
|
146
146
|
export declare function validateClone<T>(input: T): IValidation<Resolved<T>>;
|
|
147
147
|
/**
|
|
148
|
-
* Clone
|
|
148
|
+
* Clone data with detailed type validation.
|
|
149
149
|
*
|
|
150
150
|
* Clones an instance following type `T`, with detailed type validation. If the target
|
|
151
151
|
* `input` value or its member variable contains a class instance having methods,
|
|
@@ -164,8 +164,8 @@ export declare function validateClone<T>(input: unknown): IValidation<Resolved<T
|
|
|
164
164
|
/**
|
|
165
165
|
* Prune, erase superfluous properties.
|
|
166
166
|
*
|
|
167
|
-
* Remove
|
|
168
|
-
* objects. Note that, as
|
|
167
|
+
* Remove all superfluous properties from the `input` object, even including nested
|
|
168
|
+
* objects. Note that, as all superfluous properties would be deleted, you never can
|
|
169
169
|
* read those superfluous properties after calling this `prune()` function.
|
|
170
170
|
*
|
|
171
171
|
* For reference, this `typia.misc.prune()` function does not validate the input value
|
|
@@ -187,12 +187,12 @@ export declare function prune<T extends object>(input: T): void;
|
|
|
187
187
|
* Prune, erase superfluous properties, with type assertion.
|
|
188
188
|
*
|
|
189
189
|
* `typia.misc.assertPrune()` is a combination function of {@link assert} and
|
|
190
|
-
* {@link prune}. Therefore, it removes
|
|
190
|
+
* {@link prune}. Therefore, it removes all superfluous properties from the `input`
|
|
191
191
|
* object including nested objects, with type assertion.
|
|
192
192
|
*
|
|
193
193
|
* In such reason, when `input` value is not matched with the type `T`, it throws an
|
|
194
194
|
* {@link TypeGuardError} or custom error generated by *errorFactory*. Otherwise,
|
|
195
|
-
* there's no problem on the `input` value, its
|
|
195
|
+
* there's no problem on the `input` value, its all superfluous properties would be
|
|
196
196
|
* removed, including nested objects.
|
|
197
197
|
*
|
|
198
198
|
* @template T Type of the input value
|
|
@@ -206,12 +206,12 @@ export declare function assertPrune<T>(input: T, errorFactory?: undefined | ((pr
|
|
|
206
206
|
* Prune, erase superfluous properties, with type assertion.
|
|
207
207
|
*
|
|
208
208
|
* `typia.misc.assertPrune()` is a combination function of {@link assert} and
|
|
209
|
-
* {@link prune}. Therefore, it removes
|
|
209
|
+
* {@link prune}. Therefore, it removes all superfluous properties from the `input`
|
|
210
210
|
* object including nested objects, with type assertion.
|
|
211
211
|
*
|
|
212
212
|
* In such reason, when `input` value is not matched with the type `T`, it throws an
|
|
213
213
|
* {@link TypeGuardError} or custom error generated by *errorFactory*. Otherwise, there's
|
|
214
|
-
* no problem on the `input` value, its
|
|
214
|
+
* no problem on the `input` value, its all superfluous properties would be removed,
|
|
215
215
|
* including nested objects.
|
|
216
216
|
*
|
|
217
217
|
* @template T Type of the input value
|
|
@@ -224,13 +224,13 @@ export declare function assertPrune<T>(input: unknown, errorFactory?: undefined
|
|
|
224
224
|
/**
|
|
225
225
|
* Prune, erase superfluous properties, with type checking.
|
|
226
226
|
*
|
|
227
|
-
* `typia.misc.
|
|
228
|
-
* {@link prune}. Therefore, it removes
|
|
227
|
+
* `typia.misc.isPrune()` is a combination function of {@link is} and
|
|
228
|
+
* {@link prune}. Therefore, it removes all superfluous properties from the `input`
|
|
229
229
|
* object including nested objects, with type checking.
|
|
230
230
|
*
|
|
231
231
|
* In such reason, when `input` value is not matched with the type `T`, it returns
|
|
232
232
|
* `false` value. Otherwise, there's no problem on the `input` value, it returns
|
|
233
|
-
* `true` after removing
|
|
233
|
+
* `true` after removing all superfluous properties, including nested objects.
|
|
234
234
|
*
|
|
235
235
|
* @template T Type of the input value
|
|
236
236
|
* @param input Target instance to check and prune
|
|
@@ -242,13 +242,13 @@ export declare function isPrune<T>(input: T): input is T;
|
|
|
242
242
|
/**
|
|
243
243
|
* Prune, erase superfluous properties, with type checking.
|
|
244
244
|
*
|
|
245
|
-
* `typia.misc.
|
|
246
|
-
* {@link prune}. Therefore, it removes
|
|
245
|
+
* `typia.misc.isPrune()` is a combination function of {@link is} and
|
|
246
|
+
* {@link prune}. Therefore, it removes all superfluous properties from the `input`
|
|
247
247
|
* object including nested objects, with type checking.
|
|
248
248
|
*
|
|
249
249
|
* In such reason, when `input` value is not matched with the type `T`, it returns
|
|
250
250
|
* `false` value. Otherwise, there's no problem on the `input` value, it returns
|
|
251
|
-
* `true` after removing
|
|
251
|
+
* `true` after removing all superfluous properties, including nested objects.
|
|
252
252
|
*
|
|
253
253
|
* @template T Type of the input value
|
|
254
254
|
* @param input Target instance to check and prune
|
|
@@ -261,13 +261,13 @@ export declare function isPrune<T>(input: unknown): input is T;
|
|
|
261
261
|
* Prune, erase superfluous properties, with type validation.
|
|
262
262
|
*
|
|
263
263
|
* `typia.misc.validatePrune()` is a combination function of {@link validate} and
|
|
264
|
-
* {@link prune}. Therefore, it removes
|
|
264
|
+
* {@link prune}. Therefore, it removes all superfluous properties from the `input`
|
|
265
265
|
* object including nested objects, with type validation.
|
|
266
266
|
*
|
|
267
267
|
* In such reason, when `input` value is not matched with the type `T`, it returns
|
|
268
268
|
* {@link IValidation.IFailure} value with detailed error reasons. Otherwise, there's
|
|
269
269
|
* no problem on the `input` value, it returns {@link IValidation.ISuccess} value after
|
|
270
|
-
* removing
|
|
270
|
+
* removing all superfluous properties, including nested objects.
|
|
271
271
|
*
|
|
272
272
|
* @template T Type of the input value
|
|
273
273
|
* @param input Target instance to validate and prune
|
|
@@ -280,13 +280,13 @@ export declare function validatePrune<T>(input: T): IValidation<T>;
|
|
|
280
280
|
* Prune, erase superfluous properties, with type validation.
|
|
281
281
|
*
|
|
282
282
|
* `typia.misc.validatePrune()` is a combination function of {@link validate} and
|
|
283
|
-
* {@link prune}. Therefore, it removes
|
|
283
|
+
* {@link prune}. Therefore, it removes all superfluous properties from the `input`
|
|
284
284
|
* object including nested objects, with type validation.
|
|
285
285
|
*
|
|
286
286
|
* In such reason, when `input` value is not matched with the type `T`, it returns
|
|
287
287
|
* {@link IValidation.IFailure} value with detailed error reasons. Otherwise, there's
|
|
288
288
|
* no problem on the `input` value, it returns {@link IValidation.ISuccess} value after
|
|
289
|
-
* removing
|
|
289
|
+
* removing all superfluous properties, including nested objects.
|
|
290
290
|
*
|
|
291
291
|
* @template T Type of the input value
|
|
292
292
|
* @param input Target instance to validate and prune
|
package/lib/misc.d.ts
CHANGED
|
@@ -35,7 +35,7 @@ export declare function literals(): never;
|
|
|
35
35
|
*/
|
|
36
36
|
export declare function literals<T extends Atomic.Type | null>(): T[];
|
|
37
37
|
/**
|
|
38
|
-
* Clone
|
|
38
|
+
* Clone data.
|
|
39
39
|
*
|
|
40
40
|
* Clones an instance following type `T`. If the target *input* value or its member
|
|
41
41
|
* variable contains a class instance having methods, those methods would not be
|
|
@@ -54,7 +54,7 @@ export declare function literals<T extends Atomic.Type | null>(): T[];
|
|
|
54
54
|
*/
|
|
55
55
|
export declare function clone<T>(input: T): Resolved<T>;
|
|
56
56
|
/**
|
|
57
|
-
* Clone
|
|
57
|
+
* Clone data with type assertion.
|
|
58
58
|
*
|
|
59
59
|
* Clones an instance following type `T`, with type assertion. If the target `input`
|
|
60
60
|
* value or its member variable contains a class instance having methods, those
|
|
@@ -73,7 +73,7 @@ export declare function clone<T>(input: T): Resolved<T>;
|
|
|
73
73
|
*/
|
|
74
74
|
export declare function assertClone<T>(input: T, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): Resolved<T>;
|
|
75
75
|
/**
|
|
76
|
-
* Clone
|
|
76
|
+
* Clone data with type assertion.
|
|
77
77
|
*
|
|
78
78
|
* Clones an instance following type `T`, with type assertion. If the target `input`
|
|
79
79
|
* value or its member variable contains a class instance having methods, those
|
|
@@ -92,7 +92,7 @@ export declare function assertClone<T>(input: T, errorFactory?: undefined | ((pr
|
|
|
92
92
|
*/
|
|
93
93
|
export declare function assertClone<T>(input: unknown, errorFactory?: undefined | ((props: TypeGuardError.IProps) => Error)): Resolved<T>;
|
|
94
94
|
/**
|
|
95
|
-
* Clone
|
|
95
|
+
* Clone data with type checking.
|
|
96
96
|
*
|
|
97
97
|
* Clones an instance following type `T`, with type checking. If the target `input`
|
|
98
98
|
* value or its member variable contains a class instance having methods, those
|
|
@@ -110,7 +110,7 @@ export declare function assertClone<T>(input: unknown, errorFactory?: undefined
|
|
|
110
110
|
*/
|
|
111
111
|
export declare function isClone<T>(input: T): Resolved<T> | null;
|
|
112
112
|
/**
|
|
113
|
-
* Clone
|
|
113
|
+
* Clone data with type checking.
|
|
114
114
|
*
|
|
115
115
|
* Clones an instance following type `T`, with type checking. If the target `input`
|
|
116
116
|
* value or its member variable contains a class instance having methods, those
|
|
@@ -128,7 +128,7 @@ export declare function isClone<T>(input: T): Resolved<T> | null;
|
|
|
128
128
|
*/
|
|
129
129
|
export declare function isClone<T>(input: unknown): Resolved<T> | null;
|
|
130
130
|
/**
|
|
131
|
-
* Clone
|
|
131
|
+
* Clone data with detailed type validation.
|
|
132
132
|
*
|
|
133
133
|
* Clones an instance following type `T`, with detailed type validation. If the target
|
|
134
134
|
* `input` value or its member variable contains a class instance having methods,
|
|
@@ -145,7 +145,7 @@ export declare function isClone<T>(input: unknown): Resolved<T> | null;
|
|
|
145
145
|
*/
|
|
146
146
|
export declare function validateClone<T>(input: T): IValidation<Resolved<T>>;
|
|
147
147
|
/**
|
|
148
|
-
* Clone
|
|
148
|
+
* Clone data with detailed type validation.
|
|
149
149
|
*
|
|
150
150
|
* Clones an instance following type `T`, with detailed type validation. If the target
|
|
151
151
|
* `input` value or its member variable contains a class instance having methods,
|
|
@@ -164,8 +164,8 @@ export declare function validateClone<T>(input: unknown): IValidation<Resolved<T
|
|
|
164
164
|
/**
|
|
165
165
|
* Prune, erase superfluous properties.
|
|
166
166
|
*
|
|
167
|
-
* Remove
|
|
168
|
-
* objects. Note that, as
|
|
167
|
+
* Remove all superfluous properties from the `input` object, even including nested
|
|
168
|
+
* objects. Note that, as all superfluous properties would be deleted, you never can
|
|
169
169
|
* read those superfluous properties after calling this `prune()` function.
|
|
170
170
|
*
|
|
171
171
|
* For reference, this `typia.misc.prune()` function does not validate the input value
|
|
@@ -187,12 +187,12 @@ export declare function prune<T extends object>(input: T): void;
|
|
|
187
187
|
* Prune, erase superfluous properties, with type assertion.
|
|
188
188
|
*
|
|
189
189
|
* `typia.misc.assertPrune()` is a combination function of {@link assert} and
|
|
190
|
-
* {@link prune}. Therefore, it removes
|
|
190
|
+
* {@link prune}. Therefore, it removes all superfluous properties from the `input`
|
|
191
191
|
* object including nested objects, with type assertion.
|
|
192
192
|
*
|
|
193
193
|
* In such reason, when `input` value is not matched with the type `T`, it throws an
|
|
194
194
|
* {@link TypeGuardError} or custom error generated by *errorFactory*. Otherwise,
|
|
195
|
-
* there's no problem on the `input` value, its
|
|
195
|
+
* there's no problem on the `input` value, its all superfluous properties would be
|
|
196
196
|
* removed, including nested objects.
|
|
197
197
|
*
|
|
198
198
|
* @template T Type of the input value
|
|
@@ -206,12 +206,12 @@ export declare function assertPrune<T>(input: T, errorFactory?: undefined | ((pr
|
|
|
206
206
|
* Prune, erase superfluous properties, with type assertion.
|
|
207
207
|
*
|
|
208
208
|
* `typia.misc.assertPrune()` is a combination function of {@link assert} and
|
|
209
|
-
* {@link prune}. Therefore, it removes
|
|
209
|
+
* {@link prune}. Therefore, it removes all superfluous properties from the `input`
|
|
210
210
|
* object including nested objects, with type assertion.
|
|
211
211
|
*
|
|
212
212
|
* In such reason, when `input` value is not matched with the type `T`, it throws an
|
|
213
213
|
* {@link TypeGuardError} or custom error generated by *errorFactory*. Otherwise, there's
|
|
214
|
-
* no problem on the `input` value, its
|
|
214
|
+
* no problem on the `input` value, its all superfluous properties would be removed,
|
|
215
215
|
* including nested objects.
|
|
216
216
|
*
|
|
217
217
|
* @template T Type of the input value
|
|
@@ -224,13 +224,13 @@ export declare function assertPrune<T>(input: unknown, errorFactory?: undefined
|
|
|
224
224
|
/**
|
|
225
225
|
* Prune, erase superfluous properties, with type checking.
|
|
226
226
|
*
|
|
227
|
-
* `typia.misc.
|
|
228
|
-
* {@link prune}. Therefore, it removes
|
|
227
|
+
* `typia.misc.isPrune()` is a combination function of {@link is} and
|
|
228
|
+
* {@link prune}. Therefore, it removes all superfluous properties from the `input`
|
|
229
229
|
* object including nested objects, with type checking.
|
|
230
230
|
*
|
|
231
231
|
* In such reason, when `input` value is not matched with the type `T`, it returns
|
|
232
232
|
* `false` value. Otherwise, there's no problem on the `input` value, it returns
|
|
233
|
-
* `true` after removing
|
|
233
|
+
* `true` after removing all superfluous properties, including nested objects.
|
|
234
234
|
*
|
|
235
235
|
* @template T Type of the input value
|
|
236
236
|
* @param input Target instance to check and prune
|
|
@@ -242,13 +242,13 @@ export declare function isPrune<T>(input: T): input is T;
|
|
|
242
242
|
/**
|
|
243
243
|
* Prune, erase superfluous properties, with type checking.
|
|
244
244
|
*
|
|
245
|
-
* `typia.misc.
|
|
246
|
-
* {@link prune}. Therefore, it removes
|
|
245
|
+
* `typia.misc.isPrune()` is a combination function of {@link is} and
|
|
246
|
+
* {@link prune}. Therefore, it removes all superfluous properties from the `input`
|
|
247
247
|
* object including nested objects, with type checking.
|
|
248
248
|
*
|
|
249
249
|
* In such reason, when `input` value is not matched with the type `T`, it returns
|
|
250
250
|
* `false` value. Otherwise, there's no problem on the `input` value, it returns
|
|
251
|
-
* `true` after removing
|
|
251
|
+
* `true` after removing all superfluous properties, including nested objects.
|
|
252
252
|
*
|
|
253
253
|
* @template T Type of the input value
|
|
254
254
|
* @param input Target instance to check and prune
|
|
@@ -261,13 +261,13 @@ export declare function isPrune<T>(input: unknown): input is T;
|
|
|
261
261
|
* Prune, erase superfluous properties, with type validation.
|
|
262
262
|
*
|
|
263
263
|
* `typia.misc.validatePrune()` is a combination function of {@link validate} and
|
|
264
|
-
* {@link prune}. Therefore, it removes
|
|
264
|
+
* {@link prune}. Therefore, it removes all superfluous properties from the `input`
|
|
265
265
|
* object including nested objects, with type validation.
|
|
266
266
|
*
|
|
267
267
|
* In such reason, when `input` value is not matched with the type `T`, it returns
|
|
268
268
|
* {@link IValidation.IFailure} value with detailed error reasons. Otherwise, there's
|
|
269
269
|
* no problem on the `input` value, it returns {@link IValidation.ISuccess} value after
|
|
270
|
-
* removing
|
|
270
|
+
* removing all superfluous properties, including nested objects.
|
|
271
271
|
*
|
|
272
272
|
* @template T Type of the input value
|
|
273
273
|
* @param input Target instance to validate and prune
|
|
@@ -280,13 +280,13 @@ export declare function validatePrune<T>(input: T): IValidation<T>;
|
|
|
280
280
|
* Prune, erase superfluous properties, with type validation.
|
|
281
281
|
*
|
|
282
282
|
* `typia.misc.validatePrune()` is a combination function of {@link validate} and
|
|
283
|
-
* {@link prune}. Therefore, it removes
|
|
283
|
+
* {@link prune}. Therefore, it removes all superfluous properties from the `input`
|
|
284
284
|
* object including nested objects, with type validation.
|
|
285
285
|
*
|
|
286
286
|
* In such reason, when `input` value is not matched with the type `T`, it returns
|
|
287
287
|
* {@link IValidation.IFailure} value with detailed error reasons. Otherwise, there's
|
|
288
288
|
* no problem on the `input` value, it returns {@link IValidation.ISuccess} value after
|
|
289
|
-
* removing
|
|
289
|
+
* removing all superfluous properties, including nested objects.
|
|
290
290
|
*
|
|
291
291
|
* @template T Type of the input value
|
|
292
292
|
* @param input Target instance to validate and prune
|