typia 7.6.0 → 7.6.1
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/README.md +2 -1
- package/lib/IReadableURLSearchParams.d.ts +1 -1
- package/lib/TypeGuardError.mjs +26 -0
- package/lib/TypeGuardError.mjs.map +1 -0
- package/lib/factories/MetadataTypeTagFactory.js +1 -1
- package/lib/factories/MetadataTypeTagFactory.js.map +1 -1
- package/lib/factories/ProtobufFactory.js +4 -4
- package/lib/factories/ProtobufFactory.js.map +1 -1
- package/lib/factories/internal/metadata/iterate_metadata_intersection.js +1 -1
- package/lib/factories/internal/metadata/iterate_metadata_intersection.js.map +1 -1
- package/lib/functional.mjs +120 -0
- package/lib/functional.mjs.map +1 -0
- package/lib/http.d.ts +16 -16
- package/lib/http.mjs +165 -0
- package/lib/http.mjs.map +1 -0
- package/lib/index.mjs +27 -1142
- package/lib/index.mjs.map +1 -1
- package/lib/internal/_isUniqueItems.js +1 -1
- package/lib/json.d.ts +5 -5
- package/lib/json.mjs +105 -0
- package/lib/json.mjs.map +1 -0
- package/lib/llm.d.ts +8 -8
- package/lib/llm.mjs +33 -0
- package/lib/llm.mjs.map +1 -0
- package/lib/misc.d.ts +10 -10
- package/lib/misc.mjs +111 -0
- package/lib/misc.mjs.map +1 -0
- package/lib/module.d.ts +5 -5
- package/lib/module.mjs +139 -0
- package/lib/module.mjs.map +1 -0
- package/lib/notations.mjs +153 -0
- package/lib/notations.mjs.map +1 -0
- package/lib/programmers/FeatureProgrammer.d.ts +3 -3
- package/lib/programmers/TypiaProgrammer.js +1 -1
- package/lib/programmers/TypiaProgrammer.js.map +1 -1
- package/lib/programmers/helpers/UnionExplorer.js +1 -1
- package/lib/programmers/helpers/UnionExplorer.js.map +1 -1
- package/lib/programmers/helpers/UnionPredicator.d.ts +1 -1
- package/lib/programmers/helpers/UnionPredicator.js +1 -1
- package/lib/programmers/helpers/UnionPredicator.js.map +1 -1
- package/lib/programmers/json/JsonApplicationProgrammer.js +1 -1
- package/lib/programmers/llm/LlmApplicationProgrammer.js +2 -2
- package/lib/programmers/llm/LlmApplicationProgrammer.js.map +1 -1
- package/lib/programmers/llm/LlmParametersProgrammer.js +1 -1
- package/lib/programmers/llm/LlmParametersProgrammer.js.map +1 -1
- package/lib/programmers/protobuf/ProtobufEncodeProgrammer.js +1 -1
- package/lib/programmers/protobuf/ProtobufEncodeProgrammer.js.map +1 -1
- package/lib/protobuf.d.ts +9 -9
- package/lib/protobuf.mjs +111 -0
- package/lib/protobuf.mjs.map +1 -0
- package/lib/reflect.mjs +18 -0
- package/lib/reflect.mjs.map +1 -0
- package/lib/schemas/llm/ILlmApplicationOfValidate.d.ts +2 -2
- package/lib/schemas/llm/ILlmApplicationOfValidate.mjs +6 -0
- package/lib/schemas/llm/ILlmApplicationOfValidate.mjs.map +1 -0
- package/lib/schemas/llm/ILlmFunctionOfValidate.mjs +6 -0
- package/lib/schemas/llm/ILlmFunctionOfValidate.mjs.map +1 -0
- package/lib/tags/TagBase.d.ts +1 -1
- package/lib/tags/index.mjs +2 -0
- package/lib/tags/index.mjs.map +1 -0
- package/lib/transformers/ImportTransformer.js +3 -3
- package/lib/transformers/ImportTransformer.js.map +1 -1
- package/lib/transformers/features/json/JsonValidateParseTransformer.js +1 -1
- package/lib/transformers/features/json/JsonValidateParseTransformer.js.map +1 -1
- package/lib/transformers/features/json/JsonValidateStringifyTransformer.js +1 -1
- package/lib/transformers/features/json/JsonValidateStringifyTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscValidateCloneTransformer.js +1 -1
- package/lib/transformers/features/misc/MiscValidateCloneTransformer.js.map +1 -1
- package/lib/transformers/features/misc/MiscValidatePruneTransformer.js +1 -1
- package/lib/transformers/features/misc/MiscValidatePruneTransformer.js.map +1 -1
- package/lib/transformers/features/reflect/ReflectNameTransformer.js +1 -1
- package/package.json +11 -9
- package/src/IReadableURLSearchParams.ts +1 -1
- package/src/factories/MetadataTypeTagFactory.ts +1 -1
- package/src/factories/ProtobufFactory.ts +4 -4
- package/src/factories/internal/metadata/iterate_metadata_intersection.ts +1 -1
- package/src/http.ts +16 -16
- package/src/internal/_isUniqueItems.ts +1 -1
- package/src/json.ts +6 -6
- package/src/llm.ts +8 -8
- package/src/misc.ts +11 -11
- package/src/module.ts +5 -5
- package/src/programmers/FeatureProgrammer.ts +3 -3
- package/src/programmers/TypiaProgrammer.ts +1 -1
- package/src/programmers/helpers/UnionExplorer.ts +1 -1
- package/src/programmers/helpers/UnionPredicator.ts +3 -3
- package/src/programmers/json/JsonApplicationProgrammer.ts +1 -1
- package/src/programmers/llm/LlmApplicationProgrammer.ts +2 -2
- package/src/programmers/llm/LlmParametersProgrammer.ts +1 -1
- package/src/programmers/protobuf/ProtobufEncodeProgrammer.ts +1 -1
- package/src/protobuf.ts +9 -9
- package/src/schemas/llm/ILlmApplicationOfValidate.ts +2 -2
- package/src/tags/TagBase.ts +1 -1
- package/src/transformers/ImportTransformer.ts +3 -3
- package/src/transformers/features/json/JsonValidateParseTransformer.ts +1 -1
- package/src/transformers/features/json/JsonValidateStringifyTransformer.ts +1 -1
- package/src/transformers/features/misc/MiscValidateCloneTransformer.ts +1 -1
- package/src/transformers/features/misc/MiscValidatePruneTransformer.ts +1 -1
- package/src/transformers/features/reflect/ReflectNameTransformer.ts +1 -1
package/lib/protobuf.mjs
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
function message() {
|
|
5
|
+
halt("message");
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
function decode() {
|
|
11
|
+
halt("decode");
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* @internal
|
|
15
|
+
*/
|
|
16
|
+
function assertDecode() {
|
|
17
|
+
halt("assertDecode");
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
function isDecode() {
|
|
23
|
+
halt("isDecode");
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
function validateDecode() {
|
|
29
|
+
halt("validateDecode");
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* @internal
|
|
33
|
+
*/
|
|
34
|
+
function encode() {
|
|
35
|
+
halt("encode");
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
function assertEncode() {
|
|
41
|
+
halt("assertEncode");
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
function isEncode() {
|
|
47
|
+
halt("isEncode");
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @internal
|
|
51
|
+
*/
|
|
52
|
+
function validateEncode() {
|
|
53
|
+
halt("validateEncode");
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* @internal
|
|
57
|
+
*/
|
|
58
|
+
function createDecode() {
|
|
59
|
+
halt("createDecode");
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* @internal
|
|
63
|
+
*/
|
|
64
|
+
function createIsDecode() {
|
|
65
|
+
halt("createIsDecode");
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* @internal
|
|
69
|
+
*/
|
|
70
|
+
function createAssertDecode() {
|
|
71
|
+
halt("createAssertDecode");
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* @internal
|
|
75
|
+
*/
|
|
76
|
+
function createValidateDecode() {
|
|
77
|
+
halt("createValidateDecode");
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* @internal
|
|
81
|
+
*/
|
|
82
|
+
function createEncode() {
|
|
83
|
+
halt("createEncode");
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
88
|
+
function createIsEncode() {
|
|
89
|
+
halt("createIsEncode");
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* @internal
|
|
93
|
+
*/
|
|
94
|
+
function createAssertEncode() {
|
|
95
|
+
halt("createAssertEncode");
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* @internal
|
|
99
|
+
*/
|
|
100
|
+
function createValidateEncode() {
|
|
101
|
+
halt("createValidateEncode");
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* @internal
|
|
105
|
+
*/
|
|
106
|
+
function halt(name) {
|
|
107
|
+
throw new Error(`Error on typia.protobuf.${name}(): no transform has been configured. Read and follow https://typia.io/docs/setup please.`);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export { assertDecode, assertEncode, createAssertDecode, createAssertEncode, createDecode, createEncode, createIsDecode, createIsEncode, createValidateDecode, createValidateEncode, decode, encode, isDecode, isEncode, message, validateDecode, validateEncode };
|
|
111
|
+
//# sourceMappingURL=protobuf.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"protobuf.mjs","sources":["../src/protobuf.ts"],"sourcesContent":[null],"names":[],"mappings":"AAuDA;;AAEG;SACa,OAAO,GAAA;IACrB,IAAI,CAAC,SAAS,CAAC;AACjB;AAmEA;;AAEG;SACa,MAAM,GAAA;IACpB,IAAI,CAAC,QAAQ,CAAC;AAChB;AAsEA;;AAEG;SACa,YAAY,GAAA;IAC1B,IAAI,CAAC,cAAc,CAAC;AACtB;AA8DA;;AAEG;SACa,QAAQ,GAAA;IACtB,IAAI,CAAC,UAAU,CAAC;AAClB;AAgEA;;AAEG;SACa,cAAc,GAAA;IAC5B,IAAI,CAAC,gBAAgB,CAAC;AACxB;AAkCA;;AAEG;SACa,MAAM,GAAA;IACpB,IAAI,CAAC,QAAQ,CAAC;AAChB;AA4EA;;AAEG;SACa,YAAY,GAAA;IAC1B,IAAI,CAAC,cAAc,CAAC;AACtB;AAoEA;;AAEG;SACa,QAAQ,GAAA;IACtB,IAAI,CAAC,UAAU,CAAC;AAClB;AAsEA;;AAEG;SACa,cAAc,GAAA;IAC5B,IAAI,CAAC,gBAAgB,CAAC;AACxB;AA0BA;;AAEG;SACa,YAAY,GAAA;IAC1B,IAAI,CAAC,cAAc,CAAC;AACtB;AAuBA;;AAEG;SACa,cAAc,GAAA;IAC5B,IAAI,CAAC,gBAAgB,CAAC;AACxB;AA6BA;;AAEG;SACa,kBAAkB,GAAA;IAChC,IAAI,CAAC,oBAAoB,CAAC;AAC5B;AAyBA;;AAEG;SACa,oBAAoB,GAAA;IAGlC,IAAI,CAAC,sBAAsB,CAAC;AAC9B;AAuBA;;AAEG;SACa,YAAY,GAAA;IAC1B,IAAI,CAAC,cAAc,CAAC;AACtB;AAuBA;;AAEG;SACa,cAAc,GAAA;IAC5B,IAAI,CAAC,gBAAgB,CAAC;AACxB;AA6BA;;AAEG;SACa,kBAAkB,GAAA;IAChC,IAAI,CAAC,oBAAoB,CAAC;AAC5B;AAyBA;;AAEG;SACa,oBAAoB,GAAA;IAGlC,IAAI,CAAC,sBAAsB,CAAC;AAC9B;AAEA;;AAEG;AACH,SAAS,IAAI,CAAC,IAAY,EAAA;AACxB,IAAA,MAAM,IAAI,KAAK,CACb,2BAA2B,IAAI,CAAA,yFAAA,CAA2F,CAC3H;AACH;;;;"}
|
package/lib/reflect.mjs
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @internal
|
|
3
|
+
*/
|
|
4
|
+
function metadata() {
|
|
5
|
+
halt("metadata");
|
|
6
|
+
}
|
|
7
|
+
function name() {
|
|
8
|
+
halt("name");
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* @internal
|
|
12
|
+
*/
|
|
13
|
+
function halt(name) {
|
|
14
|
+
throw new Error(`Error on typia.reflect.${name}(): no transform has been configured. Read and follow https://typia.io/docs/setup please.`);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export { metadata, name };
|
|
18
|
+
//# sourceMappingURL=reflect.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reflect.mjs","sources":["../src/reflect.ts"],"sourcesContent":[null],"names":[],"mappings":"AAoCA;;AAEG;SACa,QAAQ,GAAA;IACtB,IAAI,CAAC,UAAU,CAAC;AAClB;SAIgB,IAAI,GAAA;IAClB,IAAI,CAAC,MAAM,CAAC;AACd;AAEA;;AAEG;AACH,SAAS,IAAI,CAAC,IAAY,EAAA;AACxB,IAAA,MAAM,IAAI,KAAK,CACb,0BAA0B,IAAI,CAAA,yFAAA,CAA2F,CAC1H;AACH;;;;"}
|
|
@@ -21,7 +21,7 @@ import { ILlmFunctionOfValidate } from "./ILlmFunctionOfValidate";
|
|
|
21
21
|
*
|
|
22
22
|
* By the way, there can be some parameters (or their nested properties) which must be
|
|
23
23
|
* composed by Human, not by LLM. File uploading feature or some sensitive information
|
|
24
|
-
* like
|
|
24
|
+
* like secret keys (password) are the examples. In that case, you can separate the
|
|
25
25
|
* function parameters to both LLM and human sides by configuring the
|
|
26
26
|
* {@link ILlmApplication.IOptions.separate} property. The separated parameters are
|
|
27
27
|
* assigned to the {@link ILlmFunction.separated} property.
|
|
@@ -29,7 +29,7 @@ import { ILlmFunctionOfValidate } from "./ILlmFunctionOfValidate";
|
|
|
29
29
|
* For reference, when both LLM and Human filled parameter values to call, you can
|
|
30
30
|
* merge them by calling the {@link HttpLlm.mergeParameters} function. In other words,
|
|
31
31
|
* if you've configured the {@link ILlmApplication.IOptions.separate} property, you
|
|
32
|
-
* have to merge the separated parameters before the
|
|
32
|
+
* have to merge the separated parameters before the function call execution.
|
|
33
33
|
*
|
|
34
34
|
* @reference https://platform.openai.com/docs/guides/function-calling
|
|
35
35
|
* @author Jeongho Nam - https://github.com/samchon
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ILlmApplicationOfValidate.mjs","sources":["../../../src/schemas/llm/ILlmApplicationOfValidate.ts"],"sourcesContent":[null],"names":[],"mappings":"AAoDM,IAAW;AAAjB,CAAA,UAAiB,yBAAyB,EAAA;AAE1C,CAAC,EAFgB,yBAAyB,KAAzB,yBAAyB,GAEzC,EAAA,CAAA,CAAA;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ILlmFunctionOfValidate.mjs","sources":["../../../src/schemas/llm/ILlmFunctionOfValidate.ts"],"sourcesContent":[null],"names":[],"mappings":"AAoCM,IAAW;AAAjB,CAAA,UAAiB,sBAAsB,EAAA;AAEvC,CAAC,EAFgB,sBAAsB,KAAtB,sBAAsB,GAEtC,EAAA,CAAA,CAAA;;;;"}
|
package/lib/tags/TagBase.d.ts
CHANGED
|
@@ -37,7 +37,7 @@ export declare namespace TagBase {
|
|
|
37
37
|
* `$input` would be transformed to the suitable when compilation.
|
|
38
38
|
*
|
|
39
39
|
* Also, If you've take a mistake on this script, compile error would be
|
|
40
|
-
*
|
|
40
|
+
* occurred. So, define it with confidence. Compiler will block all your
|
|
41
41
|
* mistakes.
|
|
42
42
|
*/
|
|
43
43
|
validate?: Validate;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -47,8 +47,8 @@ var ImportTransformer;
|
|
|
47
47
|
};
|
|
48
48
|
})(ImportTransformer || (exports.ImportTransformer = ImportTransformer = {}));
|
|
49
49
|
const get_directory_path = (file) => {
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
return path_1.default.resolve(
|
|
50
|
+
const split = path_1.default.resolve(file).split(path_1.default.sep);
|
|
51
|
+
split.pop();
|
|
52
|
+
return path_1.default.resolve(split.join(path_1.default.sep));
|
|
53
53
|
};
|
|
54
54
|
//# sourceMappingURL=ImportTransformer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImportTransformer.js","sourceRoot":"","sources":["../../src/transformers/ImportTransformer.ts"],"names":[],"mappings":";;;;;;A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CAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC;YAAE,OAAO,KAAK,CAAC,IAAI,CAAC;QAEzD,MAAM,QAAQ,GAAW,CAAC,GAAG,EAAE;YAC7B,MAAM,MAAM,GAAW,cAAI;iBACxB,QAAQ,CAAC,KAAK,CAAC,EAAE,EAAE,QAAQ,CAAC;iBAC5B,KAAK,CAAC,cAAI,CAAC,GAAG,CAAC;iBACf,IAAI,CAAC,GAAG,CAAC,CAAC;YACb,OAAO,MAAM,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,MAAM,EAAE,CAAC;QACpD,CAAC,CAAC,EAAE,CAAC;QAEL,OAAO,oBAAE,CAAC,OAAO,CAAC,uBAAuB,CACvC,SAAS,EACT,KAAK,CAAC,IAAI,CAAC,YAAY,EACvB,oBAAE,CAAC,OAAO,CAAC,mBAAmB,CAAC,QAAQ,CAAC,EACxC,KAAK,CAAC,IAAI,CAAC,YAAY,CACxB,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,EAvEgB,iBAAiB,iCAAjB,iBAAiB,QAuEjC;AAED,MAAM,kBAAkB,GAAG,CAAC,IAAY,EAAU,EAAE;IAClD,MAAM,KAAK,GAAa,cAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,cAAI,CAAC,GAAG,CAAC,CAAC;IAC3D,KAAK,CAAC,GAAG,EAAE,CAAC;IACZ,OAAO,cAAI,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,cAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAC5C,CAAC,CAAC"}
|
|
@@ -5,6 +5,6 @@ const JsonValidateParseProgrammer_1 = require("../../../programmers/json/JsonVal
|
|
|
5
5
|
const GenericTransformer_1 = require("../../internal/GenericTransformer");
|
|
6
6
|
var JsonValidateParseTransformer;
|
|
7
7
|
(function (JsonValidateParseTransformer) {
|
|
8
|
-
JsonValidateParseTransformer.transform = (props) => GenericTransformer_1.GenericTransformer.scalar(Object.assign(Object.assign({}, props), { method: "json.
|
|
8
|
+
JsonValidateParseTransformer.transform = (props) => GenericTransformer_1.GenericTransformer.scalar(Object.assign(Object.assign({}, props), { method: "json.validateParse", write: JsonValidateParseProgrammer_1.JsonValidateParseProgrammer.write }));
|
|
9
9
|
})(JsonValidateParseTransformer || (exports.JsonValidateParseTransformer = JsonValidateParseTransformer = {}));
|
|
10
10
|
//# sourceMappingURL=JsonValidateParseTransformer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JsonValidateParseTransformer.js","sourceRoot":"","sources":["../../../../src/transformers/features/json/JsonValidateParseTransformer.ts"],"names":[],"mappings":";;;AAAA,uGAAoG;AAGpG,0EAAuE;AAEvE,IAAiB,4BAA4B,CAO5C;AAPD,WAAiB,4BAA4B;IAC9B,sCAAS,GAAG,CAAC,KAAsB,EAAE,EAAE,CAClD,uCAAkB,CAAC,MAAM,iCACpB,KAAK,KACR,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"JsonValidateParseTransformer.js","sourceRoot":"","sources":["../../../../src/transformers/features/json/JsonValidateParseTransformer.ts"],"names":[],"mappings":";;;AAAA,uGAAoG;AAGpG,0EAAuE;AAEvE,IAAiB,4BAA4B,CAO5C;AAPD,WAAiB,4BAA4B;IAC9B,sCAAS,GAAG,CAAC,KAAsB,EAAE,EAAE,CAClD,uCAAkB,CAAC,MAAM,iCACpB,KAAK,KACR,MAAM,EAAE,oBAAoB,EAC5B,KAAK,EAAE,yDAA2B,CAAC,KAAK,IACxC,CAAC;AACP,CAAC,EAPgB,4BAA4B,4CAA5B,4BAA4B,QAO5C"}
|
|
@@ -5,6 +5,6 @@ const JsonValidateStringifyProgrammer_1 = require("../../../programmers/json/Jso
|
|
|
5
5
|
const GenericTransformer_1 = require("../../internal/GenericTransformer");
|
|
6
6
|
var JsonValidateStringifyTransformer;
|
|
7
7
|
(function (JsonValidateStringifyTransformer) {
|
|
8
|
-
JsonValidateStringifyTransformer.transform = (props) => GenericTransformer_1.GenericTransformer.scalar(Object.assign(Object.assign({}, props), { method: "json.
|
|
8
|
+
JsonValidateStringifyTransformer.transform = (props) => GenericTransformer_1.GenericTransformer.scalar(Object.assign(Object.assign({}, props), { method: "json.validateStringify", write: JsonValidateStringifyProgrammer_1.JsonValidateStringifyProgrammer.write }));
|
|
9
9
|
})(JsonValidateStringifyTransformer || (exports.JsonValidateStringifyTransformer = JsonValidateStringifyTransformer = {}));
|
|
10
10
|
//# sourceMappingURL=JsonValidateStringifyTransformer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"JsonValidateStringifyTransformer.js","sourceRoot":"","sources":["../../../../src/transformers/features/json/JsonValidateStringifyTransformer.ts"],"names":[],"mappings":";;;AAAA,+GAA4G;AAG5G,0EAAuE;AAEvE,IAAiB,gCAAgC,CAOhD;AAPD,WAAiB,gCAAgC;IAClC,0CAAS,GAAG,CAAC,KAAsB,EAAE,EAAE,CAClD,uCAAkB,CAAC,MAAM,iCACpB,KAAK,KACR,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"JsonValidateStringifyTransformer.js","sourceRoot":"","sources":["../../../../src/transformers/features/json/JsonValidateStringifyTransformer.ts"],"names":[],"mappings":";;;AAAA,+GAA4G;AAG5G,0EAAuE;AAEvE,IAAiB,gCAAgC,CAOhD;AAPD,WAAiB,gCAAgC;IAClC,0CAAS,GAAG,CAAC,KAAsB,EAAE,EAAE,CAClD,uCAAkB,CAAC,MAAM,iCACpB,KAAK,KACR,MAAM,EAAE,wBAAwB,EAChC,KAAK,EAAE,iEAA+B,CAAC,KAAK,IAC5C,CAAC;AACP,CAAC,EAPgB,gCAAgC,gDAAhC,gCAAgC,QAOhD"}
|
|
@@ -5,6 +5,6 @@ const MiscValidateCloneProgrammer_1 = require("../../../programmers/misc/MiscVal
|
|
|
5
5
|
const GenericTransformer_1 = require("../../internal/GenericTransformer");
|
|
6
6
|
var MiscValidateCloneTransformer;
|
|
7
7
|
(function (MiscValidateCloneTransformer) {
|
|
8
|
-
MiscValidateCloneTransformer.transform = (props) => GenericTransformer_1.GenericTransformer.scalar(Object.assign(Object.assign({}, props), { method: "misc.
|
|
8
|
+
MiscValidateCloneTransformer.transform = (props) => GenericTransformer_1.GenericTransformer.scalar(Object.assign(Object.assign({}, props), { method: "misc.validateClone", write: MiscValidateCloneProgrammer_1.MiscValidateCloneProgrammer.write }));
|
|
9
9
|
})(MiscValidateCloneTransformer || (exports.MiscValidateCloneTransformer = MiscValidateCloneTransformer = {}));
|
|
10
10
|
//# sourceMappingURL=MiscValidateCloneTransformer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MiscValidateCloneTransformer.js","sourceRoot":"","sources":["../../../../src/transformers/features/misc/MiscValidateCloneTransformer.ts"],"names":[],"mappings":";;;AAAA,uGAAoG;AAGpG,0EAAuE;AAEvE,IAAiB,4BAA4B,CAO5C;AAPD,WAAiB,4BAA4B;IAC9B,sCAAS,GAAG,CAAC,KAAsB,EAAE,EAAE,CAClD,uCAAkB,CAAC,MAAM,iCACpB,KAAK,KACR,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"MiscValidateCloneTransformer.js","sourceRoot":"","sources":["../../../../src/transformers/features/misc/MiscValidateCloneTransformer.ts"],"names":[],"mappings":";;;AAAA,uGAAoG;AAGpG,0EAAuE;AAEvE,IAAiB,4BAA4B,CAO5C;AAPD,WAAiB,4BAA4B;IAC9B,sCAAS,GAAG,CAAC,KAAsB,EAAE,EAAE,CAClD,uCAAkB,CAAC,MAAM,iCACpB,KAAK,KACR,MAAM,EAAE,oBAAoB,EAC5B,KAAK,EAAE,yDAA2B,CAAC,KAAK,IACxC,CAAC;AACP,CAAC,EAPgB,4BAA4B,4CAA5B,4BAA4B,QAO5C"}
|
|
@@ -5,6 +5,6 @@ const MiscValidatePruneProgrammer_1 = require("../../../programmers/misc/MiscVal
|
|
|
5
5
|
const GenericTransformer_1 = require("../../internal/GenericTransformer");
|
|
6
6
|
var MiscValidatePruneTransformer;
|
|
7
7
|
(function (MiscValidatePruneTransformer) {
|
|
8
|
-
MiscValidatePruneTransformer.transform = (props) => GenericTransformer_1.GenericTransformer.scalar(Object.assign(Object.assign({}, props), { method: "misc.
|
|
8
|
+
MiscValidatePruneTransformer.transform = (props) => GenericTransformer_1.GenericTransformer.scalar(Object.assign(Object.assign({}, props), { method: "misc.validatePrune", write: MiscValidatePruneProgrammer_1.MiscValidatePruneProgrammer.write }));
|
|
9
9
|
})(MiscValidatePruneTransformer || (exports.MiscValidatePruneTransformer = MiscValidatePruneTransformer = {}));
|
|
10
10
|
//# sourceMappingURL=MiscValidatePruneTransformer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MiscValidatePruneTransformer.js","sourceRoot":"","sources":["../../../../src/transformers/features/misc/MiscValidatePruneTransformer.ts"],"names":[],"mappings":";;;AAAA,uGAAoG;AAGpG,0EAAuE;AAEvE,IAAiB,4BAA4B,CAO5C;AAPD,WAAiB,4BAA4B;IAC9B,sCAAS,GAAG,CAAC,KAAsB,EAAE,EAAE,CAClD,uCAAkB,CAAC,MAAM,iCACpB,KAAK,KACR,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"MiscValidatePruneTransformer.js","sourceRoot":"","sources":["../../../../src/transformers/features/misc/MiscValidatePruneTransformer.ts"],"names":[],"mappings":";;;AAAA,uGAAoG;AAGpG,0EAAuE;AAEvE,IAAiB,4BAA4B,CAO5C;AAPD,WAAiB,4BAA4B;IAC9B,sCAAS,GAAG,CAAC,KAAsB,EAAE,EAAE,CAClD,uCAAkB,CAAC,MAAM,iCACpB,KAAK,KACR,MAAM,EAAE,oBAAoB,EAC5B,KAAK,EAAE,yDAA2B,CAAC,KAAK,IACxC,CAAC;AACP,CAAC,EAPgB,4BAA4B,4CAA5B,4BAA4B,QAO5C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "typia",
|
|
3
|
-
"version": "7.6.
|
|
3
|
+
"version": "7.6.1",
|
|
4
4
|
"description": "Superfast runtime validators with only one line",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"typings": "lib/index.d.ts",
|
|
@@ -21,9 +21,10 @@
|
|
|
21
21
|
"build": "rimraf lib && tsc && rollup -c",
|
|
22
22
|
"dev": "rimraf lib && tsc --watch",
|
|
23
23
|
"dev:errors": "tsc --project tsconfig.errors.json --watch",
|
|
24
|
-
"eslint": "eslint
|
|
25
|
-
"eslint:fix": "eslint
|
|
26
|
-
"prettier": "prettier src --
|
|
24
|
+
"eslint": "eslint",
|
|
25
|
+
"eslint:fix": "eslint --fix",
|
|
26
|
+
"prettier": "prettier src --check",
|
|
27
|
+
"prettier:fix": "prettier src --write",
|
|
27
28
|
"------------------------------------------------": "",
|
|
28
29
|
"package:latest": "ts-node deploy --tag latest",
|
|
29
30
|
"package:next": "ts-node deploy --tag next",
|
|
@@ -41,7 +42,7 @@
|
|
|
41
42
|
},
|
|
42
43
|
"homepage": "https://typia.io",
|
|
43
44
|
"dependencies": {
|
|
44
|
-
"@samchon/openapi": "^2.4.
|
|
45
|
+
"@samchon/openapi": "^2.4.2",
|
|
45
46
|
"commander": "^10.0.0",
|
|
46
47
|
"comment-json": "^4.2.3",
|
|
47
48
|
"inquirer": "^8.2.5",
|
|
@@ -49,8 +50,8 @@
|
|
|
49
50
|
"randexp": "^0.5.3"
|
|
50
51
|
},
|
|
51
52
|
"peerDependencies": {
|
|
52
|
-
"
|
|
53
|
-
"
|
|
53
|
+
"@samchon/openapi": ">=2.4.2 <3.0.0",
|
|
54
|
+
"typescript": ">=4.8.0 <5.8.0"
|
|
54
55
|
},
|
|
55
56
|
"devDependencies": {
|
|
56
57
|
"@rollup/plugin-commonjs": "^26.0.1",
|
|
@@ -60,9 +61,10 @@
|
|
|
60
61
|
"@types/inquirer": "^8.2.5",
|
|
61
62
|
"@types/node": "^18.15.12",
|
|
62
63
|
"@types/ts-expose-internals": "npm:ts-expose-internals@5.5.4",
|
|
63
|
-
"@typescript-eslint/eslint-plugin": "^
|
|
64
|
-
"@typescript-eslint/parser": "^
|
|
64
|
+
"@typescript-eslint/eslint-plugin": "^8.1.0",
|
|
65
|
+
"@typescript-eslint/parser": "^8.1.0",
|
|
65
66
|
"chalk": "^4.0.0",
|
|
67
|
+
"eslint-plugin-deprecation": "^3.0.0",
|
|
66
68
|
"prettier": "^3.2.5",
|
|
67
69
|
"rimraf": "^5.0.5",
|
|
68
70
|
"rollup": "^4.18.0",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Interface for a readable URLSearchParams object.
|
|
3
3
|
*
|
|
4
4
|
* This interface is a subset of the {@link URLSearchParams} interface,
|
|
5
|
-
* designed especially for the [Hono.JS](https://hono.dev/)
|
|
5
|
+
* designed especially for the [Hono.JS](https://hono.dev/) library.
|
|
6
6
|
*
|
|
7
7
|
* @author https://github.com/miyaji255
|
|
8
8
|
*/
|
|
@@ -152,7 +152,7 @@ export namespace MetadataTypeTagFactory {
|
|
|
152
152
|
if (tag.target !== props.type) {
|
|
153
153
|
success &&= props.report({
|
|
154
154
|
property: null,
|
|
155
|
-
message: `target must
|
|
155
|
+
message: `target must contain ${props.type} type`,
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
158
|
|
|
@@ -409,14 +409,14 @@ export namespace ProtobufFactory {
|
|
|
409
409
|
);
|
|
410
410
|
}
|
|
411
411
|
//----
|
|
412
|
-
//
|
|
412
|
+
// ARRAY CASES
|
|
413
413
|
//----
|
|
414
|
-
// DO NOT ALLOW MULTI-
|
|
414
|
+
// DO NOT ALLOW MULTI-DIMENSIONAL ARRAY
|
|
415
415
|
if (
|
|
416
416
|
meta.arrays.length &&
|
|
417
417
|
meta.arrays.some((array) => !!array.type.value.arrays.length)
|
|
418
418
|
)
|
|
419
|
-
noSupport("over two
|
|
419
|
+
noSupport("over two dimensional array type");
|
|
420
420
|
// CHILD OF ARRAY TYPE MUST BE REQUIRED
|
|
421
421
|
if (
|
|
422
422
|
meta.arrays.length &&
|
|
@@ -494,7 +494,7 @@ export namespace ProtobufFactory {
|
|
|
494
494
|
meta.objects[0]!.type.properties.some((p) => !!p.value.arrays.length)
|
|
495
495
|
)
|
|
496
496
|
noSupport("dynamic object with array value type");
|
|
497
|
-
// UNION WITH DYNAMIC
|
|
497
|
+
// UNION WITH DYNAMIC OBJECTTa
|
|
498
498
|
if (
|
|
499
499
|
meta.size() > 1 &&
|
|
500
500
|
meta.objects.length &&
|
|
@@ -16,7 +16,7 @@ export const iterate_metadata_intersection = (
|
|
|
16
16
|
if (props.intersected === true) return false;
|
|
17
17
|
else if (props.type.isIntersection() === false) return false;
|
|
18
18
|
|
|
19
|
-
//
|
|
19
|
+
// CONSTRUCT FAKE METADATA LIST
|
|
20
20
|
const commit: MetadataCollection = props.collection.clone();
|
|
21
21
|
props.collection["options"] = undefined;
|
|
22
22
|
|
package/src/http.ts
CHANGED
|
@@ -25,7 +25,7 @@ import { TypeGuardError } from "./TypeGuardError";
|
|
|
25
25
|
*
|
|
26
26
|
* By the way, as `FormData` is not enough to express complex data structures,
|
|
27
27
|
* `typia.http.formData()` function has some limitations. If target type `T` is
|
|
28
|
-
* not following those restrictions, compilation errors would be
|
|
28
|
+
* not following those restrictions, compilation errors would be occurred.
|
|
29
29
|
*
|
|
30
30
|
* 1. Type `T` must be an object type
|
|
31
31
|
* 2. Do not allow dynamic property
|
|
@@ -34,7 +34,7 @@ import { TypeGuardError } from "./TypeGuardError";
|
|
|
34
34
|
*
|
|
35
35
|
* Also, `typia.http.formData()` function does not perform validation about the
|
|
36
36
|
* decoded value. Therefore, if you can't sure that input data is following the
|
|
37
|
-
* `T` type, it would better to call one of below functions
|
|
37
|
+
* `T` type, it would better to call one of below functions instead.
|
|
38
38
|
*
|
|
39
39
|
* @template T Expected type of decoded value
|
|
40
40
|
* @param input FormData instance
|
|
@@ -66,7 +66,7 @@ export function formData(): never {
|
|
|
66
66
|
*
|
|
67
67
|
* By the way, as `FormData` is not enough to express complex data structures,
|
|
68
68
|
* `typia.http.assertFormData()` function has some limitations. If target type `T`
|
|
69
|
-
* is not following those restrictions, compilation errors would be
|
|
69
|
+
* is not following those restrictions, compilation errors would be occurred.
|
|
70
70
|
*
|
|
71
71
|
* 1. Type `T` must be an object type
|
|
72
72
|
* 2. Do not allow dynamic property
|
|
@@ -106,7 +106,7 @@ export function assertFormData(): never {
|
|
|
106
106
|
*
|
|
107
107
|
* By the way, as `FormData` is not enough to express complex data structures,
|
|
108
108
|
* `typia.http.isFormData()` function has some limitations. If target type `T` is
|
|
109
|
-
* not following those restrictions, compilation errors would be
|
|
109
|
+
* not following those restrictions, compilation errors would be occurred.
|
|
110
110
|
*
|
|
111
111
|
* 1. Type `T` must be an object type
|
|
112
112
|
* 2. Do not allow dynamic property
|
|
@@ -146,7 +146,7 @@ export function isFormData(): never {
|
|
|
146
146
|
*
|
|
147
147
|
* By the way, as `FormData` is not enough to express complex data structures,
|
|
148
148
|
* `typia.http.validateFormData()` function has some limitations. If target type
|
|
149
|
-
* `T` is not following those restrictions, compilation errors would be
|
|
149
|
+
* `T` is not following those restrictions, compilation errors would be occurred.
|
|
150
150
|
*
|
|
151
151
|
* 1. Type `T` must be an object type
|
|
152
152
|
* 2. Do not allow dynamic property
|
|
@@ -183,7 +183,7 @@ export function validateFormData(): never {
|
|
|
183
183
|
*
|
|
184
184
|
* By the way, as URL query is not enough to express complex data structures,
|
|
185
185
|
* `typia.http.query()` function has some limitations. If target type `T` is not
|
|
186
|
-
* following those restrictions, compilation errors would be
|
|
186
|
+
* following those restrictions, compilation errors would be occurred.
|
|
187
187
|
*
|
|
188
188
|
* 1. Type `T` must be an object type
|
|
189
189
|
* 2. Do not allow dynamic property
|
|
@@ -192,7 +192,7 @@ export function validateFormData(): never {
|
|
|
192
192
|
*
|
|
193
193
|
* Also, `typia.http.query()` function does not perform validation about the decoded
|
|
194
194
|
* value. Therefore, if you can't sure that input data is following the `T` type,
|
|
195
|
-
* it would better to call one of below functions
|
|
195
|
+
* it would better to call one of below functions instead.
|
|
196
196
|
*
|
|
197
197
|
* - {@link assertQuery}
|
|
198
198
|
* - {@link isQuery}
|
|
@@ -230,7 +230,7 @@ export function query(): never {
|
|
|
230
230
|
*
|
|
231
231
|
* By the way, as URL query is not enough to express complex data structures,
|
|
232
232
|
* `typia.http.assertQuery()` function has some limitations. If target type `T` is
|
|
233
|
-
* notfollowing those restrictions, compilation errors would be
|
|
233
|
+
* notfollowing those restrictions, compilation errors would be occurred.
|
|
234
234
|
*
|
|
235
235
|
* 1. Type `T` must be an object type
|
|
236
236
|
* 2. Do not allow dynamic property
|
|
@@ -270,7 +270,7 @@ export function assertQuery(): never {
|
|
|
270
270
|
*
|
|
271
271
|
* By the way, as URL query is not enough to express complex data structures,
|
|
272
272
|
* `typia.http.isQuery()` function has some limitations. If target type `T` is
|
|
273
|
-
* notfollowing those restrictions, compilation errors would be
|
|
273
|
+
* notfollowing those restrictions, compilation errors would be occurred.
|
|
274
274
|
*
|
|
275
275
|
* 1. Type `T` must be an object type
|
|
276
276
|
* 2. Do not allow dynamic property
|
|
@@ -309,7 +309,7 @@ export function isQuery(): never {
|
|
|
309
309
|
*
|
|
310
310
|
* By the way, as URL query is not enough to express complex data structures,
|
|
311
311
|
* `typia.http.validateQuery()` function has some limitations. If target type `T` is
|
|
312
|
-
* notfollowing those restrictions, compilation errors would be
|
|
312
|
+
* notfollowing those restrictions, compilation errors would be occurred.
|
|
313
313
|
*
|
|
314
314
|
* 1. Type `T` must be an object type
|
|
315
315
|
* 2. Do not allow dynamic property
|
|
@@ -345,7 +345,7 @@ export function validateQuery(): never {
|
|
|
345
345
|
*
|
|
346
346
|
* By the way, as HTTP headers are not enough to express complex data structures,
|
|
347
347
|
* `typia.http.headers()` function has some limitations. If target type `T` is not
|
|
348
|
-
* following those restrictions, compilation errors would be
|
|
348
|
+
* following those restrictions, compilation errors would be occurred.
|
|
349
349
|
*
|
|
350
350
|
* 1. Type `T` must be an object type
|
|
351
351
|
* 2. Do not allow dynamic property
|
|
@@ -376,7 +376,7 @@ export function validateQuery(): never {
|
|
|
376
376
|
*
|
|
377
377
|
* Also, `typia.http.headers()` function does not perform validation about the decoded
|
|
378
378
|
* value. Therefore, if you can't sure that input data is following the `T` type,
|
|
379
|
-
* it would better to call one of below functions
|
|
379
|
+
* it would better to call one of below functions instead.
|
|
380
380
|
*
|
|
381
381
|
* - {@link assertHeaders}
|
|
382
382
|
* - {@link isHeaders}
|
|
@@ -414,7 +414,7 @@ export function headers(): never {
|
|
|
414
414
|
*
|
|
415
415
|
* By the way, as HTTP headers are not enough to express complex data structures,
|
|
416
416
|
* `typia.http.headers()` function has some limitations. If target type `T` is not
|
|
417
|
-
* following those restrictions, compilation errors would be
|
|
417
|
+
* following those restrictions, compilation errors would be occurred.
|
|
418
418
|
*
|
|
419
419
|
* 1. Type `T` must be an object type
|
|
420
420
|
* 2. Do not allow dynamic property
|
|
@@ -478,7 +478,7 @@ export function assertHeaders(): never {
|
|
|
478
478
|
*
|
|
479
479
|
* By the way, as HTTP headers are not enough to express complex data structures,
|
|
480
480
|
* `typia.http.headers()` function has some limitations. If target type `T` is not
|
|
481
|
-
* following those restrictions, compilation errors would be
|
|
481
|
+
* following those restrictions, compilation errors would be occurred.
|
|
482
482
|
*
|
|
483
483
|
* 1. Type `T` must be an object type
|
|
484
484
|
* 2. Do not allow dynamic property
|
|
@@ -539,7 +539,7 @@ export function isHeaders(): never {
|
|
|
539
539
|
*
|
|
540
540
|
* By the way, as HTTP headers are not enough to express complex data structures,
|
|
541
541
|
* `typia.http.headers()` function has some limitations. If target type `T` is not
|
|
542
|
-
* following those restrictions, compilation errors would be
|
|
542
|
+
* following those restrictions, compilation errors would be occurred.
|
|
543
543
|
*
|
|
544
544
|
* 1. Type `T` must be an object type
|
|
545
545
|
* 2. Do not allow dynamic property
|
|
@@ -592,7 +592,7 @@ export function validateHeaders(): never {
|
|
|
592
592
|
* URL path parameter decoder.
|
|
593
593
|
*
|
|
594
594
|
* `typia.http.parameter()` is a function decoding a path parameter, with automatic
|
|
595
|
-
* type casting to the expected type. When type `T` has
|
|
595
|
+
* type casting to the expected type. When type `T` has been defined as `boolean` or
|
|
596
596
|
* `number` type, `typia.http.parameter()` will cast the value to the expected type.
|
|
597
597
|
*
|
|
598
598
|
* Also, `typia.http.parameter()` performs type assertion to the decoded value by
|
package/src/json.ts
CHANGED
|
@@ -174,7 +174,7 @@ export function application(): never {
|
|
|
174
174
|
* Safe `JSON.parse()` function with type assertion.
|
|
175
175
|
*
|
|
176
176
|
* `typia.json.assertParse()` is a combination function of `JSON.parse()` and
|
|
177
|
-
* {@link assert}. Therefore, it
|
|
177
|
+
* {@link assert}. Therefore, it converts a JSON (JavaScript Object Notation) string
|
|
178
178
|
* to a `T` typed instance with type assertion.
|
|
179
179
|
*
|
|
180
180
|
* In such reason, when parsed JSON string value is not matched with the type `T`, it
|
|
@@ -197,7 +197,7 @@ export function assertParse(
|
|
|
197
197
|
* Safe `JSON.parse()` function with type assertion.
|
|
198
198
|
*
|
|
199
199
|
* `typia.json.assertParse()` is a combination function of `JSON.parse()` and
|
|
200
|
-
* {@link assert}. Therefore, it
|
|
200
|
+
* {@link assert}. Therefore, it converts a JSON (JavaScript Object Notation) string
|
|
201
201
|
* to a `T` typed instance with type assertion.
|
|
202
202
|
*
|
|
203
203
|
* In such reason, when parsed JSON string value is not matched with the type `T`,
|
|
@@ -230,7 +230,7 @@ export function assertParse<T>(): Primitive<T> {
|
|
|
230
230
|
* Safe `JSON.parse()` function with type checking.
|
|
231
231
|
*
|
|
232
232
|
* `typia.json.isParse()` is a combination function of `JSON.parse()` and {@link is}.
|
|
233
|
-
* Therefore, it
|
|
233
|
+
* Therefore, it converts a JSON (JavaScript Object Notation) string to a `T` typed
|
|
234
234
|
* instance with type checking.
|
|
235
235
|
*
|
|
236
236
|
* In such reason, when parsed JSON string value is not matched with the type `T`, it
|
|
@@ -249,7 +249,7 @@ export function isParse(input: string): never;
|
|
|
249
249
|
* Safe `JSON.parse()` function with type checking.
|
|
250
250
|
*
|
|
251
251
|
* `typia.json.isParse()` is a combination function of `JSON.parse()` and {@link is}.
|
|
252
|
-
* Therefore, it
|
|
252
|
+
* Therefore, it converts a JSON (JavaScript Object Notation) string to a `T` typed
|
|
253
253
|
* instance with type checking.
|
|
254
254
|
*
|
|
255
255
|
* In such reason, when parsed JSON string value is not matched with the type `T`, it
|
|
@@ -277,7 +277,7 @@ export function isParse<T>(): Primitive<T> | null {
|
|
|
277
277
|
* Safe `JSON.parse()` function with detailed type validation.
|
|
278
278
|
*
|
|
279
279
|
* `typia.json.validateParse()` is a combination function of `JSON.parse()` and
|
|
280
|
-
* {@link validate}. Therefore, it
|
|
280
|
+
* {@link validate}. Therefore, it converts a JSON (JavaScript Object Notation) string
|
|
281
281
|
* to a `T` typed instance with detailed type validation.
|
|
282
282
|
*
|
|
283
283
|
* In such reason, when parsed JSON string value is not matched with the type `T`, it
|
|
@@ -297,7 +297,7 @@ export function validateParse(input: string): never;
|
|
|
297
297
|
* Safe `JSON.parse()` function with detailed type validation.
|
|
298
298
|
*
|
|
299
299
|
* `typia.json.validateParse()` is a combination function of `JSON.parse()` and
|
|
300
|
-
* {@link validate}. Therefore, it
|
|
300
|
+
* {@link validate}. Therefore, it converts a JSON (JavaScript Object Notation) string
|
|
301
301
|
* to a `T` typed instance with detailed type validation.
|
|
302
302
|
*
|
|
303
303
|
* In such reason, when parsed JSON string value is not matched with the type `T`, it
|