typia 7.0.0-dev.20241007 → 7.0.0-dev.20241008
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/factories/ExpressionFactory.d.ts +1 -1
- package/lib/factories/ValueFactory.d.ts +1 -1
- package/lib/programmers/AssertProgrammer.d.ts +5 -2
- package/lib/programmers/AssertProgrammer.js +12 -5
- package/lib/programmers/AssertProgrammer.js.map +1 -1
- package/lib/programmers/ImportProgrammer.d.ts +25 -4
- package/lib/programmers/ImportProgrammer.js +67 -31
- package/lib/programmers/ImportProgrammer.js.map +1 -1
- package/lib/programmers/RandomProgrammer.js +48 -32
- package/lib/programmers/RandomProgrammer.js.map +1 -1
- package/lib/programmers/ValidateProgrammer.js +10 -4
- package/lib/programmers/ValidateProgrammer.js.map +1 -1
- package/lib/programmers/functional/FunctionalAssertFunctionProgrammer.js +1 -1
- package/lib/programmers/functional/FunctionalAssertFunctionProgrammer.js.map +1 -1
- package/lib/programmers/functional/FunctionalValidateFunctionProgrammer.d.ts +1 -0
- package/lib/programmers/functional/FunctionalValidateFunctionProgrammer.js +14 -5
- package/lib/programmers/functional/FunctionalValidateFunctionProgrammer.js.map +1 -1
- package/lib/programmers/functional/FunctionalValidateParametersProgrammer.js +5 -1
- package/lib/programmers/functional/FunctionalValidateParametersProgrammer.js.map +1 -1
- package/lib/programmers/functional/FunctionalValidateReturnProgrammer.js +1 -0
- package/lib/programmers/functional/FunctionalValidateReturnProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpAssertFormDataProgrammer.js +4 -1
- package/lib/programmers/http/HttpAssertFormDataProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpAssertHeadersProgrammer.js +4 -1
- package/lib/programmers/http/HttpAssertHeadersProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpAssertQueryProgrammer.js +4 -1
- package/lib/programmers/http/HttpAssertQueryProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpFormDataProgrammer.js +10 -6
- package/lib/programmers/http/HttpFormDataProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpHeadersProgrammer.js +10 -6
- package/lib/programmers/http/HttpHeadersProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpQueryProgrammer.js +10 -6
- package/lib/programmers/http/HttpQueryProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpValidateFormDataProgrammer.js +5 -3
- package/lib/programmers/http/HttpValidateFormDataProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpValidateHeadersProgrammer.js +5 -3
- package/lib/programmers/http/HttpValidateHeadersProgrammer.js.map +1 -1
- package/lib/programmers/http/HttpValidateQueryProgrammer.js +5 -3
- package/lib/programmers/http/HttpValidateQueryProgrammer.js.map +1 -1
- package/lib/programmers/json/JsonAssertParseProgrammer.js +14 -7
- package/lib/programmers/json/JsonAssertParseProgrammer.js.map +1 -1
- package/lib/programmers/json/JsonAssertStringifyProgrammer.js +4 -1
- package/lib/programmers/json/JsonAssertStringifyProgrammer.js.map +1 -1
- package/lib/programmers/json/JsonIsParseProgrammer.js +10 -6
- package/lib/programmers/json/JsonIsParseProgrammer.js.map +1 -1
- package/lib/programmers/json/JsonValidateParseProgrammer.js +16 -4
- package/lib/programmers/json/JsonValidateParseProgrammer.js.map +1 -1
- package/lib/programmers/json/JsonValidateStringifyProgrammer.js +7 -3
- package/lib/programmers/json/JsonValidateStringifyProgrammer.js.map +1 -1
- package/lib/programmers/misc/MiscAssertCloneProgrammer.js +4 -1
- package/lib/programmers/misc/MiscAssertCloneProgrammer.js.map +1 -1
- package/lib/programmers/misc/MiscAssertPruneProgrammer.js +4 -1
- package/lib/programmers/misc/MiscAssertPruneProgrammer.js.map +1 -1
- package/lib/programmers/misc/MiscCloneProgrammer.js +10 -6
- package/lib/programmers/misc/MiscCloneProgrammer.js.map +1 -1
- package/lib/programmers/misc/MiscValidateCloneProgrammer.js +5 -3
- package/lib/programmers/misc/MiscValidateCloneProgrammer.js.map +1 -1
- package/lib/programmers/misc/MiscValidatePruneProgrammer.js +10 -4
- package/lib/programmers/misc/MiscValidatePruneProgrammer.js.map +1 -1
- package/lib/programmers/notations/NotationAssertGeneralProgrammer.js +4 -1
- package/lib/programmers/notations/NotationAssertGeneralProgrammer.js.map +1 -1
- package/lib/programmers/notations/NotationGeneralProgrammer.d.ts +2 -1
- package/lib/programmers/notations/NotationGeneralProgrammer.js +13 -5
- package/lib/programmers/notations/NotationGeneralProgrammer.js.map +1 -1
- package/lib/programmers/notations/NotationValidateGeneralProgrammer.js +5 -3
- package/lib/programmers/notations/NotationValidateGeneralProgrammer.js.map +1 -1
- package/lib/programmers/protobuf/ProtobufAssertDecodeProgrammer.js +4 -1
- package/lib/programmers/protobuf/ProtobufAssertDecodeProgrammer.js.map +1 -1
- package/lib/programmers/protobuf/ProtobufAssertEncodeProgrammer.js +4 -1
- package/lib/programmers/protobuf/ProtobufAssertEncodeProgrammer.js.map +1 -1
- package/lib/programmers/protobuf/ProtobufDecodeProgrammer.js +10 -6
- package/lib/programmers/protobuf/ProtobufDecodeProgrammer.js.map +1 -1
- package/lib/programmers/protobuf/ProtobufValidateDecodeProgrammer.js +5 -3
- package/lib/programmers/protobuf/ProtobufValidateDecodeProgrammer.js.map +1 -1
- package/lib/programmers/protobuf/ProtobufValidateEncodeProgrammer.js +7 -3
- package/lib/programmers/protobuf/ProtobufValidateEncodeProgrammer.js.map +1 -1
- package/package.json +1 -1
- package/src/factories/JsonMetadataFactory.ts +63 -63
- package/src/factories/ProtobufFactory.ts +275 -275
- package/src/programmers/AssertProgrammer.ts +454 -456
- package/src/programmers/CheckerProgrammer.ts +1610 -1610
- package/src/programmers/ImportProgrammer.ts +184 -109
- package/src/programmers/IsProgrammer.ts +273 -273
- package/src/programmers/RandomProgrammer.ts +168 -149
- package/src/programmers/TypiaProgrammer.ts +171 -171
- package/src/programmers/ValidateProgrammer.ts +434 -430
- package/src/programmers/functional/FunctionalAssertFunctionProgrammer.ts +1 -1
- package/src/programmers/functional/FunctionalValidateFunctionProgrammer.ts +12 -16
- package/src/programmers/functional/FunctionalValidateParametersProgrammer.ts +5 -12
- package/src/programmers/functional/FunctionalValidateReturnProgrammer.ts +1 -0
- package/src/programmers/helpers/OptionPredicator.ts +15 -15
- package/src/programmers/http/HttpAssertFormDataProgrammer.ts +99 -96
- package/src/programmers/http/HttpAssertHeadersProgrammer.ts +99 -96
- package/src/programmers/http/HttpAssertQueryProgrammer.ts +105 -102
- package/src/programmers/http/HttpFormDataProgrammer.ts +304 -308
- package/src/programmers/http/HttpHeadersProgrammer.ts +400 -404
- package/src/programmers/http/HttpIsFormDataProgrammer.ts +108 -108
- package/src/programmers/http/HttpIsHeadersProgrammer.ts +108 -108
- package/src/programmers/http/HttpIsQueryProgrammer.ts +114 -114
- package/src/programmers/http/HttpParameterProgrammer.ts +115 -115
- package/src/programmers/http/HttpQueryProgrammer.ts +329 -333
- package/src/programmers/http/HttpValidateFormDataProgrammer.ts +92 -90
- package/src/programmers/http/HttpValidateHeadersProgrammer.ts +92 -90
- package/src/programmers/http/HttpValidateQueryProgrammer.ts +98 -96
- package/src/programmers/json/JsonApplicationProgrammer.ts +92 -92
- package/src/programmers/json/JsonAssertParseProgrammer.ts +103 -104
- package/src/programmers/json/JsonAssertStringifyProgrammer.ts +115 -112
- package/src/programmers/json/JsonIsParseProgrammer.ts +114 -118
- package/src/programmers/json/JsonIsStringifyProgrammer.ts +108 -108
- package/src/programmers/json/JsonStringifyProgrammer.ts +1124 -1124
- package/src/programmers/json/JsonValidateParseProgrammer.ts +105 -95
- package/src/programmers/json/JsonValidateStringifyProgrammer.ts +124 -119
- package/src/programmers/misc/MiscAssertCloneProgrammer.ts +95 -92
- package/src/programmers/misc/MiscAssertPruneProgrammer.ts +116 -113
- package/src/programmers/misc/MiscCloneProgrammer.ts +1025 -1029
- package/src/programmers/misc/MiscIsCloneProgrammer.ts +99 -99
- package/src/programmers/misc/MiscIsPruneProgrammer.ts +97 -97
- package/src/programmers/misc/MiscLiteralsProgrammer.ts +80 -80
- package/src/programmers/misc/MiscPruneProgrammer.ts +725 -725
- package/src/programmers/misc/MiscValidateCloneProgrammer.ts +111 -109
- package/src/programmers/misc/MiscValidatePruneProgrammer.ts +113 -109
- package/src/programmers/notations/NotationAssertGeneralProgrammer.ts +101 -98
- package/src/programmers/notations/NotationGeneralProgrammer.ts +977 -973
- package/src/programmers/notations/NotationIsGeneralProgrammer.ts +105 -105
- package/src/programmers/notations/NotationValidateGeneralProgrammer.ts +119 -117
- package/src/programmers/protobuf/ProtobufAssertDecodeProgrammer.ts +98 -95
- package/src/programmers/protobuf/ProtobufAssertEncodeProgrammer.ts +102 -99
- package/src/programmers/protobuf/ProtobufDecodeProgrammer.ts +708 -711
- package/src/programmers/protobuf/ProtobufEncodeProgrammer.ts +1019 -1019
- package/src/programmers/protobuf/ProtobufIsDecodeProgrammer.ts +109 -109
- package/src/programmers/protobuf/ProtobufIsEncodeProgrammer.ts +98 -98
- package/src/programmers/protobuf/ProtobufValidateDecodeProgrammer.ts +92 -90
- package/src/programmers/protobuf/ProtobufValidateEncodeProgrammer.ts +119 -114
- package/src/transform.ts +35 -35
- package/src/transformers/CallExpressionTransformer.ts +540 -540
- package/src/transformers/FileTransformer.ts +120 -120
- package/src/transformers/IProgrammerProps.ts +11 -11
- package/src/transformers/ITransformOptions.ts +62 -62
- package/src/transformers/ITransformProps.ts +9 -9
- package/src/transformers/ITypiaContext.ts +18 -18
- package/src/transformers/ImportTransformer.ts +66 -66
- package/src/transformers/NodeTransformer.ts +17 -17
- package/src/transformers/TransformerError.ts +59 -59
- package/src/transformers/features/AssertTransformer.ts +24 -24
- package/src/transformers/features/CreateAssertTransformer.ts +24 -24
- package/src/transformers/features/CreateIsTransformer.ts +18 -18
- package/src/transformers/features/CreateRandomTransformer.ts +43 -43
- package/src/transformers/features/CreateValidateTransformer.ts +18 -18
- package/src/transformers/features/IsTransformer.ts +18 -18
- package/src/transformers/features/RandomTransformer.ts +41 -41
- package/src/transformers/features/ValidateTransformer.ts +18 -18
- package/src/transformers/features/functional/FunctionalGenericTransformer.ts +57 -57
- package/src/transformers/features/http/CreateHttpAssertFormDataTransformer.ts +13 -13
- package/src/transformers/features/http/CreateHttpAssertHeadersTransformer.ts +13 -13
- package/src/transformers/features/http/CreateHttpAssertQueryTransformer.ts +13 -13
- package/src/transformers/features/http/CreateHttpFormDataTransformer.ts +13 -13
- package/src/transformers/features/http/CreateHttpHeadersTransformer.ts +13 -13
- package/src/transformers/features/http/CreateHttpIsFormDataTransformer.ts +13 -13
- package/src/transformers/features/http/CreateHttpIsHeadersTransformer.ts +13 -13
- package/src/transformers/features/http/CreateHttpIsQueryTransformer.ts +13 -13
- package/src/transformers/features/http/CreateHttpParameterTransformer.ts +13 -13
- package/src/transformers/features/http/CreateHttpQueryTransformer.ts +13 -13
- package/src/transformers/features/http/CreateHttpValidateFormDataTransformer.ts +13 -13
- package/src/transformers/features/http/CreateHttpValidateHeadersTransformer.ts +13 -13
- package/src/transformers/features/http/CreateHttpValidateQueryTransformer.ts +13 -13
- package/src/transformers/features/http/HttpAssertFormDataTransformer.ts +13 -13
- package/src/transformers/features/http/HttpAssertHeadersTransformer.ts +13 -13
- package/src/transformers/features/http/HttpAssertQueryTransformer.ts +13 -13
- package/src/transformers/features/http/HttpFormDataTransformer.ts +13 -13
- package/src/transformers/features/http/HttpHeadersTransformer.ts +13 -13
- package/src/transformers/features/http/HttpIsFormDataTransformer.ts +13 -13
- package/src/transformers/features/http/HttpIsHeadersTransformer.ts +13 -13
- package/src/transformers/features/http/HttpIsQueryTransformer.ts +13 -13
- package/src/transformers/features/http/HttpParameterTransformer.ts +13 -13
- package/src/transformers/features/http/HttpQueryTransformer.ts +13 -13
- package/src/transformers/features/http/HttpValidateFormDataTransformer.ts +13 -13
- package/src/transformers/features/http/HttpValidateHeadersTransformer.ts +13 -13
- package/src/transformers/features/http/HttpValidateQueryTransformer.ts +13 -13
- package/src/transformers/features/json/JsonApplicationTransformer.ts +130 -130
- package/src/transformers/features/json/JsonAssertParseTransformer.ts +13 -13
- package/src/transformers/features/json/JsonAssertStringifyTransformer.ts +13 -13
- package/src/transformers/features/json/JsonCreateAssertParseTransformer.ts +13 -13
- package/src/transformers/features/json/JsonCreateAssertStringifyTransformer.ts +13 -13
- package/src/transformers/features/json/JsonCreateIsParseTransformer.ts +13 -13
- package/src/transformers/features/json/JsonCreateIsStringifyTransformer.ts +13 -13
- package/src/transformers/features/json/JsonCreateStringifyTransformer.ts +13 -13
- package/src/transformers/features/json/JsonCreateValidateParseTransformer.ts +13 -13
- package/src/transformers/features/json/JsonCreateValidateStringifyProgrammer.ts +13 -13
- package/src/transformers/features/json/JsonIsParseTransformer.ts +13 -13
- package/src/transformers/features/json/JsonIsStringifyTransformer.ts +13 -13
- package/src/transformers/features/json/JsonStringifyTransformer.ts +13 -13
- package/src/transformers/features/json/JsonValidateParseTransformer.ts +13 -13
- package/src/transformers/features/json/JsonValidateStringifyTransformer.ts +13 -13
- package/src/transformers/features/llm/LlmApplicationTransformer.ts +86 -86
- package/src/transformers/features/llm/LlmSchemaTransformer.ts +59 -59
- package/src/transformers/features/misc/MiscAssertCloneTransformer.ts +13 -13
- package/src/transformers/features/misc/MiscAssertPruneTransformer.ts +13 -13
- package/src/transformers/features/misc/MiscCloneTransformer.ts +13 -13
- package/src/transformers/features/misc/MiscCreateAssertCloneTransformer.ts +13 -13
- package/src/transformers/features/misc/MiscCreateAssertPruneTransformer.ts +13 -13
- package/src/transformers/features/misc/MiscCreateCloneTransformer.ts +13 -13
- package/src/transformers/features/misc/MiscCreateIsCloneTransformer.ts +13 -13
- package/src/transformers/features/misc/MiscCreateIsPruneTransformer.ts +13 -13
- package/src/transformers/features/misc/MiscCreatePruneTransformer.ts +13 -13
- package/src/transformers/features/misc/MiscCreateValidateCloneTransformer.ts +13 -13
- package/src/transformers/features/misc/MiscCreateValidatePruneTransformer.ts +13 -13
- package/src/transformers/features/misc/MiscIsCloneTransformer.ts +13 -13
- package/src/transformers/features/misc/MiscIsPruneTransformer.ts +13 -13
- package/src/transformers/features/misc/MiscLiteralsTransformer.ts +35 -35
- package/src/transformers/features/misc/MiscPruneTransformer.ts +13 -13
- package/src/transformers/features/misc/MiscValidateCloneTransformer.ts +13 -13
- package/src/transformers/features/misc/MiscValidatePruneTransformer.ts +13 -13
- package/src/transformers/features/notations/NotationAssertGeneralTransformer.ts +20 -20
- package/src/transformers/features/notations/NotationCreateAssertGeneralTransformer.ts +20 -20
- package/src/transformers/features/notations/NotationCreateGeneralTransformer.ts +20 -20
- package/src/transformers/features/notations/NotationCreateIsGeneralTransformer.ts +20 -20
- package/src/transformers/features/notations/NotationCreateValidateGeneralTransformer.ts +20 -20
- package/src/transformers/features/notations/NotationGeneralTransformer.ts +18 -18
- package/src/transformers/features/notations/NotationIsGeneralTransformer.ts +20 -20
- package/src/transformers/features/notations/NotationValidateGeneralTransformer.ts +20 -20
- package/src/transformers/features/protobuf/ProtobufAssertDecodeTransformer.ts +13 -13
- package/src/transformers/features/protobuf/ProtobufAssertEncodeTransformer.ts +13 -13
- package/src/transformers/features/protobuf/ProtobufCreateAssertDecodeTransformer.ts +13 -13
- package/src/transformers/features/protobuf/ProtobufCreateAssertEncodeTransformer.ts +13 -13
- package/src/transformers/features/protobuf/ProtobufCreateDecodeTransformer.ts +13 -13
- package/src/transformers/features/protobuf/ProtobufCreateEncodeTransformer.ts +13 -13
- package/src/transformers/features/protobuf/ProtobufCreateIsDecodeTransformer.ts +13 -13
- package/src/transformers/features/protobuf/ProtobufCreateIsEncodeTransformer.ts +13 -13
- package/src/transformers/features/protobuf/ProtobufCreateValidateDecodeTransformer.ts +13 -13
- package/src/transformers/features/protobuf/ProtobufCreateValidateEncodeTransformer.ts +13 -13
- package/src/transformers/features/protobuf/ProtobufDecodeTransformer.ts +13 -13
- package/src/transformers/features/protobuf/ProtobufEncodeTransformer.ts +13 -13
- package/src/transformers/features/protobuf/ProtobufIsDecodeTransformer.ts +13 -13
- package/src/transformers/features/protobuf/ProtobufIsEncodeTransformer.ts +13 -13
- package/src/transformers/features/protobuf/ProtobufMessageTransformer.ts +35 -35
- package/src/transformers/features/protobuf/ProtobufValidateDecodeTransformer.ts +13 -13
- package/src/transformers/features/protobuf/ProtobufValidateEncodeTransformer.ts +13 -13
- package/src/transformers/features/reflect/ReflectMetadataTransformer.ts +69 -69
- package/src/transformers/features/reflect/ReflectNameTransformer.ts +82 -82
- package/src/transformers/internal/GenericTransformer.ts +101 -101
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { HttpValidateFormDataProgrammer } from "../../../programmers/http/HttpValidateFormDataProgrammer";
|
|
2
|
-
|
|
3
|
-
import { ITransformProps } from "../../ITransformProps";
|
|
4
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
5
|
-
|
|
6
|
-
export namespace HttpValidateFormDataTransformer {
|
|
7
|
-
export const transform = (props: ITransformProps) =>
|
|
8
|
-
GenericTransformer.scalar({
|
|
9
|
-
...props,
|
|
10
|
-
method: "http.validateFormData",
|
|
11
|
-
write: HttpValidateFormDataProgrammer.write,
|
|
12
|
-
});
|
|
13
|
-
}
|
|
1
|
+
import { HttpValidateFormDataProgrammer } from "../../../programmers/http/HttpValidateFormDataProgrammer";
|
|
2
|
+
|
|
3
|
+
import { ITransformProps } from "../../ITransformProps";
|
|
4
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
5
|
+
|
|
6
|
+
export namespace HttpValidateFormDataTransformer {
|
|
7
|
+
export const transform = (props: ITransformProps) =>
|
|
8
|
+
GenericTransformer.scalar({
|
|
9
|
+
...props,
|
|
10
|
+
method: "http.validateFormData",
|
|
11
|
+
write: HttpValidateFormDataProgrammer.write,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { HttpValidateHeadersProgrammer } from "../../../programmers/http/HttpValidateHeadersProgrammer";
|
|
2
|
-
|
|
3
|
-
import { ITransformProps } from "../../ITransformProps";
|
|
4
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
5
|
-
|
|
6
|
-
export namespace HttpValidateHeadersTransformer {
|
|
7
|
-
export const transform = (props: ITransformProps) =>
|
|
8
|
-
GenericTransformer.scalar({
|
|
9
|
-
...props,
|
|
10
|
-
method: "http.validateHeaders",
|
|
11
|
-
write: HttpValidateHeadersProgrammer.write,
|
|
12
|
-
});
|
|
13
|
-
}
|
|
1
|
+
import { HttpValidateHeadersProgrammer } from "../../../programmers/http/HttpValidateHeadersProgrammer";
|
|
2
|
+
|
|
3
|
+
import { ITransformProps } from "../../ITransformProps";
|
|
4
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
5
|
+
|
|
6
|
+
export namespace HttpValidateHeadersTransformer {
|
|
7
|
+
export const transform = (props: ITransformProps) =>
|
|
8
|
+
GenericTransformer.scalar({
|
|
9
|
+
...props,
|
|
10
|
+
method: "http.validateHeaders",
|
|
11
|
+
write: HttpValidateHeadersProgrammer.write,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { HttpValidateQueryProgrammer } from "../../../programmers/http/HttpValidateQueryProgrammer";
|
|
2
|
-
|
|
3
|
-
import { ITransformProps } from "../../ITransformProps";
|
|
4
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
5
|
-
|
|
6
|
-
export namespace HttpValidateQueryTransformer {
|
|
7
|
-
export const transform = (props: ITransformProps) =>
|
|
8
|
-
GenericTransformer.scalar({
|
|
9
|
-
...props,
|
|
10
|
-
method: "http.validateQuery",
|
|
11
|
-
write: HttpValidateQueryProgrammer.write,
|
|
12
|
-
});
|
|
13
|
-
}
|
|
1
|
+
import { HttpValidateQueryProgrammer } from "../../../programmers/http/HttpValidateQueryProgrammer";
|
|
2
|
+
|
|
3
|
+
import { ITransformProps } from "../../ITransformProps";
|
|
4
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
5
|
+
|
|
6
|
+
export namespace HttpValidateQueryTransformer {
|
|
7
|
+
export const transform = (props: ITransformProps) =>
|
|
8
|
+
GenericTransformer.scalar({
|
|
9
|
+
...props,
|
|
10
|
+
method: "http.validateQuery",
|
|
11
|
+
write: HttpValidateQueryProgrammer.write,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
@@ -1,130 +1,130 @@
|
|
|
1
|
-
import ts from "typescript";
|
|
2
|
-
|
|
3
|
-
import { LiteralFactory } from "../../../factories/LiteralFactory";
|
|
4
|
-
import { MetadataCollection } from "../../../factories/MetadataCollection";
|
|
5
|
-
import { MetadataFactory } from "../../../factories/MetadataFactory";
|
|
6
|
-
|
|
7
|
-
import { IJsonApplication } from "../../../schemas/json/IJsonApplication";
|
|
8
|
-
import { Metadata } from "../../../schemas/metadata/Metadata";
|
|
9
|
-
|
|
10
|
-
import { JsonApplicationProgrammer } from "../../../programmers/json/JsonApplicationProgrammer";
|
|
11
|
-
|
|
12
|
-
import { ValidationPipe } from "../../../typings/ValidationPipe";
|
|
13
|
-
|
|
14
|
-
import { ITransformProps } from "../../ITransformProps";
|
|
15
|
-
import { TransformerError } from "../../TransformerError";
|
|
16
|
-
|
|
17
|
-
export namespace JsonApplicationTransformer {
|
|
18
|
-
export const transform = (
|
|
19
|
-
props: Pick<ITransformProps, "context" | "expression">,
|
|
20
|
-
): ts.Expression => {
|
|
21
|
-
if (!props.expression.typeArguments?.length)
|
|
22
|
-
throw new TransformerError({
|
|
23
|
-
code: "typia.json.application",
|
|
24
|
-
message: "no generic argument.",
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
//----
|
|
28
|
-
// GET ARGUMENTS
|
|
29
|
-
//----
|
|
30
|
-
// VALIDATE TUPLE ARGUMENTS
|
|
31
|
-
const top: ts.Node = props.expression.typeArguments[0]!;
|
|
32
|
-
if (!ts.isTupleTypeNode(top)) return props.expression;
|
|
33
|
-
else if (top.elements.some((child) => !ts.isTypeNode(child)))
|
|
34
|
-
return props.expression;
|
|
35
|
-
|
|
36
|
-
// GET TYPES
|
|
37
|
-
const types: ts.Type[] = top.elements.map((child) =>
|
|
38
|
-
props.context.checker.getTypeFromTypeNode(child as ts.TypeNode),
|
|
39
|
-
);
|
|
40
|
-
if (types.some((t) => t.isTypeParameter()))
|
|
41
|
-
throw new TransformerError({
|
|
42
|
-
code: "typia.json.application",
|
|
43
|
-
message: "non-specified generic argument(s).",
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
// ADDITIONAL PARAMETERS
|
|
47
|
-
const version: "3.0" | "3.1" = get_parameter<"3.0" | "3.1">({
|
|
48
|
-
checker: props.context.checker,
|
|
49
|
-
name: "Version",
|
|
50
|
-
is: (str) => str === "3.0" || str === "3.1",
|
|
51
|
-
cast: (str) => str as "3.0" | "3.1",
|
|
52
|
-
default: () => "3.1",
|
|
53
|
-
})(props.expression.typeArguments[1]);
|
|
54
|
-
|
|
55
|
-
//----
|
|
56
|
-
// GENERATORS
|
|
57
|
-
//----
|
|
58
|
-
// METADATA
|
|
59
|
-
const collection: MetadataCollection = new MetadataCollection({
|
|
60
|
-
replace: MetadataCollection.replace,
|
|
61
|
-
});
|
|
62
|
-
const results: ValidationPipe<Metadata, MetadataFactory.IError>[] =
|
|
63
|
-
types.map((type) =>
|
|
64
|
-
MetadataFactory.analyze({
|
|
65
|
-
checker: props.context.checker,
|
|
66
|
-
transformer: props.context.transformer,
|
|
67
|
-
options: {
|
|
68
|
-
escape: true,
|
|
69
|
-
constant: true,
|
|
70
|
-
absorb: false,
|
|
71
|
-
validate: JsonApplicationProgrammer.validate,
|
|
72
|
-
},
|
|
73
|
-
collection,
|
|
74
|
-
type,
|
|
75
|
-
}),
|
|
76
|
-
);
|
|
77
|
-
|
|
78
|
-
// REPORT BUG IF REQUIRED
|
|
79
|
-
const metadatas: Metadata[] = [];
|
|
80
|
-
const errors: MetadataFactory.IError[] = [];
|
|
81
|
-
for (const r of results) {
|
|
82
|
-
if (r.success === false) errors.push(...r.errors);
|
|
83
|
-
else metadatas.push(r.data);
|
|
84
|
-
}
|
|
85
|
-
if (errors.length)
|
|
86
|
-
throw TransformerError.from({
|
|
87
|
-
code: "typia.json.application",
|
|
88
|
-
errors,
|
|
89
|
-
});
|
|
90
|
-
|
|
91
|
-
// APPLICATION
|
|
92
|
-
const app: IJsonApplication<any> =
|
|
93
|
-
JsonApplicationProgrammer.write(version)(metadatas);
|
|
94
|
-
return LiteralFactory.write(app);
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
const get_parameter =
|
|
98
|
-
<Value>(props: {
|
|
99
|
-
checker: ts.TypeChecker;
|
|
100
|
-
name: string;
|
|
101
|
-
is: (value: string) => boolean;
|
|
102
|
-
cast: (value: string) => Value;
|
|
103
|
-
default: () => Value;
|
|
104
|
-
}) =>
|
|
105
|
-
(node: ts.TypeNode | undefined): Value => {
|
|
106
|
-
if (!node) return props.default();
|
|
107
|
-
|
|
108
|
-
// CHECK LITERAL TYPE
|
|
109
|
-
const type: ts.Type = props.checker.getTypeFromTypeNode(node);
|
|
110
|
-
if (
|
|
111
|
-
!type.isLiteral() &&
|
|
112
|
-
(type.getFlags() & ts.TypeFlags.BooleanLiteral) === 0
|
|
113
|
-
)
|
|
114
|
-
throw new TransformerError({
|
|
115
|
-
code: "typia.json.application",
|
|
116
|
-
message: `generic argument "${props.name}" must be constant.`,
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
// GET VALUE AND VALIDATE IT
|
|
120
|
-
const value = type.isLiteral()
|
|
121
|
-
? type.value
|
|
122
|
-
: props.checker.typeToString(type);
|
|
123
|
-
if (typeof value !== "string" || props.is(value) === false)
|
|
124
|
-
throw new TransformerError({
|
|
125
|
-
code: "typia.json.application",
|
|
126
|
-
message: `invalid value on generic argument "${props.name}".`,
|
|
127
|
-
});
|
|
128
|
-
return props.cast(value);
|
|
129
|
-
};
|
|
130
|
-
}
|
|
1
|
+
import ts from "typescript";
|
|
2
|
+
|
|
3
|
+
import { LiteralFactory } from "../../../factories/LiteralFactory";
|
|
4
|
+
import { MetadataCollection } from "../../../factories/MetadataCollection";
|
|
5
|
+
import { MetadataFactory } from "../../../factories/MetadataFactory";
|
|
6
|
+
|
|
7
|
+
import { IJsonApplication } from "../../../schemas/json/IJsonApplication";
|
|
8
|
+
import { Metadata } from "../../../schemas/metadata/Metadata";
|
|
9
|
+
|
|
10
|
+
import { JsonApplicationProgrammer } from "../../../programmers/json/JsonApplicationProgrammer";
|
|
11
|
+
|
|
12
|
+
import { ValidationPipe } from "../../../typings/ValidationPipe";
|
|
13
|
+
|
|
14
|
+
import { ITransformProps } from "../../ITransformProps";
|
|
15
|
+
import { TransformerError } from "../../TransformerError";
|
|
16
|
+
|
|
17
|
+
export namespace JsonApplicationTransformer {
|
|
18
|
+
export const transform = (
|
|
19
|
+
props: Pick<ITransformProps, "context" | "expression">,
|
|
20
|
+
): ts.Expression => {
|
|
21
|
+
if (!props.expression.typeArguments?.length)
|
|
22
|
+
throw new TransformerError({
|
|
23
|
+
code: "typia.json.application",
|
|
24
|
+
message: "no generic argument.",
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
//----
|
|
28
|
+
// GET ARGUMENTS
|
|
29
|
+
//----
|
|
30
|
+
// VALIDATE TUPLE ARGUMENTS
|
|
31
|
+
const top: ts.Node = props.expression.typeArguments[0]!;
|
|
32
|
+
if (!ts.isTupleTypeNode(top)) return props.expression;
|
|
33
|
+
else if (top.elements.some((child) => !ts.isTypeNode(child)))
|
|
34
|
+
return props.expression;
|
|
35
|
+
|
|
36
|
+
// GET TYPES
|
|
37
|
+
const types: ts.Type[] = top.elements.map((child) =>
|
|
38
|
+
props.context.checker.getTypeFromTypeNode(child as ts.TypeNode),
|
|
39
|
+
);
|
|
40
|
+
if (types.some((t) => t.isTypeParameter()))
|
|
41
|
+
throw new TransformerError({
|
|
42
|
+
code: "typia.json.application",
|
|
43
|
+
message: "non-specified generic argument(s).",
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
// ADDITIONAL PARAMETERS
|
|
47
|
+
const version: "3.0" | "3.1" = get_parameter<"3.0" | "3.1">({
|
|
48
|
+
checker: props.context.checker,
|
|
49
|
+
name: "Version",
|
|
50
|
+
is: (str) => str === "3.0" || str === "3.1",
|
|
51
|
+
cast: (str) => str as "3.0" | "3.1",
|
|
52
|
+
default: () => "3.1",
|
|
53
|
+
})(props.expression.typeArguments[1]);
|
|
54
|
+
|
|
55
|
+
//----
|
|
56
|
+
// GENERATORS
|
|
57
|
+
//----
|
|
58
|
+
// METADATA
|
|
59
|
+
const collection: MetadataCollection = new MetadataCollection({
|
|
60
|
+
replace: MetadataCollection.replace,
|
|
61
|
+
});
|
|
62
|
+
const results: ValidationPipe<Metadata, MetadataFactory.IError>[] =
|
|
63
|
+
types.map((type) =>
|
|
64
|
+
MetadataFactory.analyze({
|
|
65
|
+
checker: props.context.checker,
|
|
66
|
+
transformer: props.context.transformer,
|
|
67
|
+
options: {
|
|
68
|
+
escape: true,
|
|
69
|
+
constant: true,
|
|
70
|
+
absorb: false,
|
|
71
|
+
validate: JsonApplicationProgrammer.validate,
|
|
72
|
+
},
|
|
73
|
+
collection,
|
|
74
|
+
type,
|
|
75
|
+
}),
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
// REPORT BUG IF REQUIRED
|
|
79
|
+
const metadatas: Metadata[] = [];
|
|
80
|
+
const errors: MetadataFactory.IError[] = [];
|
|
81
|
+
for (const r of results) {
|
|
82
|
+
if (r.success === false) errors.push(...r.errors);
|
|
83
|
+
else metadatas.push(r.data);
|
|
84
|
+
}
|
|
85
|
+
if (errors.length)
|
|
86
|
+
throw TransformerError.from({
|
|
87
|
+
code: "typia.json.application",
|
|
88
|
+
errors,
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
// APPLICATION
|
|
92
|
+
const app: IJsonApplication<any> =
|
|
93
|
+
JsonApplicationProgrammer.write(version)(metadatas);
|
|
94
|
+
return LiteralFactory.write(app);
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
const get_parameter =
|
|
98
|
+
<Value>(props: {
|
|
99
|
+
checker: ts.TypeChecker;
|
|
100
|
+
name: string;
|
|
101
|
+
is: (value: string) => boolean;
|
|
102
|
+
cast: (value: string) => Value;
|
|
103
|
+
default: () => Value;
|
|
104
|
+
}) =>
|
|
105
|
+
(node: ts.TypeNode | undefined): Value => {
|
|
106
|
+
if (!node) return props.default();
|
|
107
|
+
|
|
108
|
+
// CHECK LITERAL TYPE
|
|
109
|
+
const type: ts.Type = props.checker.getTypeFromTypeNode(node);
|
|
110
|
+
if (
|
|
111
|
+
!type.isLiteral() &&
|
|
112
|
+
(type.getFlags() & ts.TypeFlags.BooleanLiteral) === 0
|
|
113
|
+
)
|
|
114
|
+
throw new TransformerError({
|
|
115
|
+
code: "typia.json.application",
|
|
116
|
+
message: `generic argument "${props.name}" must be constant.`,
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
// GET VALUE AND VALIDATE IT
|
|
120
|
+
const value = type.isLiteral()
|
|
121
|
+
? type.value
|
|
122
|
+
: props.checker.typeToString(type);
|
|
123
|
+
if (typeof value !== "string" || props.is(value) === false)
|
|
124
|
+
throw new TransformerError({
|
|
125
|
+
code: "typia.json.application",
|
|
126
|
+
message: `invalid value on generic argument "${props.name}".`,
|
|
127
|
+
});
|
|
128
|
+
return props.cast(value);
|
|
129
|
+
};
|
|
130
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { JsonAssertParseProgrammer } from "../../../programmers/json/JsonAssertParseProgrammer";
|
|
2
|
-
|
|
3
|
-
import { ITransformProps } from "../../ITransformProps";
|
|
4
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
5
|
-
|
|
6
|
-
export namespace JsonAssertParseTransformer {
|
|
7
|
-
export const transform = (props: ITransformProps) =>
|
|
8
|
-
GenericTransformer.scalar({
|
|
9
|
-
...props,
|
|
10
|
-
method: "json.assertParse",
|
|
11
|
-
write: JsonAssertParseProgrammer.write,
|
|
12
|
-
});
|
|
13
|
-
}
|
|
1
|
+
import { JsonAssertParseProgrammer } from "../../../programmers/json/JsonAssertParseProgrammer";
|
|
2
|
+
|
|
3
|
+
import { ITransformProps } from "../../ITransformProps";
|
|
4
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
5
|
+
|
|
6
|
+
export namespace JsonAssertParseTransformer {
|
|
7
|
+
export const transform = (props: ITransformProps) =>
|
|
8
|
+
GenericTransformer.scalar({
|
|
9
|
+
...props,
|
|
10
|
+
method: "json.assertParse",
|
|
11
|
+
write: JsonAssertParseProgrammer.write,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { JsonAssertStringifyProgrammer } from "../../../programmers/json/JsonAssertStringifyProgrammer";
|
|
2
|
-
|
|
3
|
-
import { ITransformProps } from "../../ITransformProps";
|
|
4
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
5
|
-
|
|
6
|
-
export namespace JsonAssertStringifyTransformer {
|
|
7
|
-
export const transform = (props: ITransformProps) =>
|
|
8
|
-
GenericTransformer.scalar({
|
|
9
|
-
...props,
|
|
10
|
-
method: "json.assertStringify",
|
|
11
|
-
write: JsonAssertStringifyProgrammer.write,
|
|
12
|
-
});
|
|
13
|
-
}
|
|
1
|
+
import { JsonAssertStringifyProgrammer } from "../../../programmers/json/JsonAssertStringifyProgrammer";
|
|
2
|
+
|
|
3
|
+
import { ITransformProps } from "../../ITransformProps";
|
|
4
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
5
|
+
|
|
6
|
+
export namespace JsonAssertStringifyTransformer {
|
|
7
|
+
export const transform = (props: ITransformProps) =>
|
|
8
|
+
GenericTransformer.scalar({
|
|
9
|
+
...props,
|
|
10
|
+
method: "json.assertStringify",
|
|
11
|
+
write: JsonAssertStringifyProgrammer.write,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { JsonAssertParseProgrammer } from "../../../programmers/json/JsonAssertParseProgrammer";
|
|
2
|
-
|
|
3
|
-
import { ITransformProps } from "../../ITransformProps";
|
|
4
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
5
|
-
|
|
6
|
-
export namespace JsonCreateAssertParseTransformer {
|
|
7
|
-
export const transform = (props: ITransformProps) =>
|
|
8
|
-
GenericTransformer.factory({
|
|
9
|
-
...props,
|
|
10
|
-
method: "json.createAssertParse",
|
|
11
|
-
write: JsonAssertParseProgrammer.write,
|
|
12
|
-
});
|
|
13
|
-
}
|
|
1
|
+
import { JsonAssertParseProgrammer } from "../../../programmers/json/JsonAssertParseProgrammer";
|
|
2
|
+
|
|
3
|
+
import { ITransformProps } from "../../ITransformProps";
|
|
4
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
5
|
+
|
|
6
|
+
export namespace JsonCreateAssertParseTransformer {
|
|
7
|
+
export const transform = (props: ITransformProps) =>
|
|
8
|
+
GenericTransformer.factory({
|
|
9
|
+
...props,
|
|
10
|
+
method: "json.createAssertParse",
|
|
11
|
+
write: JsonAssertParseProgrammer.write,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { JsonAssertStringifyProgrammer } from "../../../programmers/json/JsonAssertStringifyProgrammer";
|
|
2
|
-
|
|
3
|
-
import { ITransformProps } from "../../ITransformProps";
|
|
4
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
5
|
-
|
|
6
|
-
export namespace JsonCreateAssertStringifyTransformer {
|
|
7
|
-
export const transform = (props: ITransformProps) =>
|
|
8
|
-
GenericTransformer.factory({
|
|
9
|
-
...props,
|
|
10
|
-
method: "json.createAssertStringify",
|
|
11
|
-
write: JsonAssertStringifyProgrammer.write,
|
|
12
|
-
});
|
|
13
|
-
}
|
|
1
|
+
import { JsonAssertStringifyProgrammer } from "../../../programmers/json/JsonAssertStringifyProgrammer";
|
|
2
|
+
|
|
3
|
+
import { ITransformProps } from "../../ITransformProps";
|
|
4
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
5
|
+
|
|
6
|
+
export namespace JsonCreateAssertStringifyTransformer {
|
|
7
|
+
export const transform = (props: ITransformProps) =>
|
|
8
|
+
GenericTransformer.factory({
|
|
9
|
+
...props,
|
|
10
|
+
method: "json.createAssertStringify",
|
|
11
|
+
write: JsonAssertStringifyProgrammer.write,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { JsonIsParseProgrammer } from "../../../programmers/json/JsonIsParseProgrammer";
|
|
2
|
-
|
|
3
|
-
import { ITransformProps } from "../../ITransformProps";
|
|
4
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
5
|
-
|
|
6
|
-
export namespace JsonCreateIsParseTransformer {
|
|
7
|
-
export const transform = (props: ITransformProps) =>
|
|
8
|
-
GenericTransformer.factory({
|
|
9
|
-
...props,
|
|
10
|
-
method: "json.createIsParse",
|
|
11
|
-
write: JsonIsParseProgrammer.write,
|
|
12
|
-
});
|
|
13
|
-
}
|
|
1
|
+
import { JsonIsParseProgrammer } from "../../../programmers/json/JsonIsParseProgrammer";
|
|
2
|
+
|
|
3
|
+
import { ITransformProps } from "../../ITransformProps";
|
|
4
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
5
|
+
|
|
6
|
+
export namespace JsonCreateIsParseTransformer {
|
|
7
|
+
export const transform = (props: ITransformProps) =>
|
|
8
|
+
GenericTransformer.factory({
|
|
9
|
+
...props,
|
|
10
|
+
method: "json.createIsParse",
|
|
11
|
+
write: JsonIsParseProgrammer.write,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { JsonIsStringifyProgrammer } from "../../../programmers/json/JsonIsStringifyProgrammer";
|
|
2
|
-
|
|
3
|
-
import { ITransformProps } from "../../ITransformProps";
|
|
4
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
5
|
-
|
|
6
|
-
export namespace JsonCreateIsStringifyTransformer {
|
|
7
|
-
export const transform = (props: ITransformProps) =>
|
|
8
|
-
GenericTransformer.factory({
|
|
9
|
-
...props,
|
|
10
|
-
method: "json.stringify",
|
|
11
|
-
write: JsonIsStringifyProgrammer.write,
|
|
12
|
-
});
|
|
13
|
-
}
|
|
1
|
+
import { JsonIsStringifyProgrammer } from "../../../programmers/json/JsonIsStringifyProgrammer";
|
|
2
|
+
|
|
3
|
+
import { ITransformProps } from "../../ITransformProps";
|
|
4
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
5
|
+
|
|
6
|
+
export namespace JsonCreateIsStringifyTransformer {
|
|
7
|
+
export const transform = (props: ITransformProps) =>
|
|
8
|
+
GenericTransformer.factory({
|
|
9
|
+
...props,
|
|
10
|
+
method: "json.stringify",
|
|
11
|
+
write: JsonIsStringifyProgrammer.write,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { JsonStringifyProgrammer } from "../../../programmers/json/JsonStringifyProgrammer";
|
|
2
|
-
|
|
3
|
-
import { ITransformProps } from "../../ITransformProps";
|
|
4
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
5
|
-
|
|
6
|
-
export namespace JsonCreateStringifyTransformer {
|
|
7
|
-
export const transform = (props: ITransformProps) =>
|
|
8
|
-
GenericTransformer.factory({
|
|
9
|
-
...props,
|
|
10
|
-
method: "json.createStringify",
|
|
11
|
-
write: JsonStringifyProgrammer.write,
|
|
12
|
-
});
|
|
13
|
-
}
|
|
1
|
+
import { JsonStringifyProgrammer } from "../../../programmers/json/JsonStringifyProgrammer";
|
|
2
|
+
|
|
3
|
+
import { ITransformProps } from "../../ITransformProps";
|
|
4
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
5
|
+
|
|
6
|
+
export namespace JsonCreateStringifyTransformer {
|
|
7
|
+
export const transform = (props: ITransformProps) =>
|
|
8
|
+
GenericTransformer.factory({
|
|
9
|
+
...props,
|
|
10
|
+
method: "json.createStringify",
|
|
11
|
+
write: JsonStringifyProgrammer.write,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { JsonValidateParseProgrammer } from "../../../programmers/json/JsonValidateParseProgrammer";
|
|
2
|
-
|
|
3
|
-
import { ITransformProps } from "../../ITransformProps";
|
|
4
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
5
|
-
|
|
6
|
-
export namespace JsonCreateValidateParseTransformer {
|
|
7
|
-
export const transform = (props: ITransformProps) =>
|
|
8
|
-
GenericTransformer.factory({
|
|
9
|
-
...props,
|
|
10
|
-
method: "json.createValidateParse",
|
|
11
|
-
write: JsonValidateParseProgrammer.write,
|
|
12
|
-
});
|
|
13
|
-
}
|
|
1
|
+
import { JsonValidateParseProgrammer } from "../../../programmers/json/JsonValidateParseProgrammer";
|
|
2
|
+
|
|
3
|
+
import { ITransformProps } from "../../ITransformProps";
|
|
4
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
5
|
+
|
|
6
|
+
export namespace JsonCreateValidateParseTransformer {
|
|
7
|
+
export const transform = (props: ITransformProps) =>
|
|
8
|
+
GenericTransformer.factory({
|
|
9
|
+
...props,
|
|
10
|
+
method: "json.createValidateParse",
|
|
11
|
+
write: JsonValidateParseProgrammer.write,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { JsonValidateStringifyProgrammer } from "../../../programmers/json/JsonValidateStringifyProgrammer";
|
|
2
|
-
|
|
3
|
-
import { ITransformProps } from "../../ITransformProps";
|
|
4
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
5
|
-
|
|
6
|
-
export namespace JsonCreateValidateStringifyTransformer {
|
|
7
|
-
export const transform = (props: ITransformProps) =>
|
|
8
|
-
GenericTransformer.factory({
|
|
9
|
-
...props,
|
|
10
|
-
method: "json.createValidateStringify",
|
|
11
|
-
write: JsonValidateStringifyProgrammer.write,
|
|
12
|
-
});
|
|
13
|
-
}
|
|
1
|
+
import { JsonValidateStringifyProgrammer } from "../../../programmers/json/JsonValidateStringifyProgrammer";
|
|
2
|
+
|
|
3
|
+
import { ITransformProps } from "../../ITransformProps";
|
|
4
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
5
|
+
|
|
6
|
+
export namespace JsonCreateValidateStringifyTransformer {
|
|
7
|
+
export const transform = (props: ITransformProps) =>
|
|
8
|
+
GenericTransformer.factory({
|
|
9
|
+
...props,
|
|
10
|
+
method: "json.createValidateStringify",
|
|
11
|
+
write: JsonValidateStringifyProgrammer.write,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { JsonIsParseProgrammer } from "../../../programmers/json/JsonIsParseProgrammer";
|
|
2
|
-
|
|
3
|
-
import { ITransformProps } from "../../ITransformProps";
|
|
4
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
5
|
-
|
|
6
|
-
export namespace JsonIsParseTransformer {
|
|
7
|
-
export const transform = (props: ITransformProps) =>
|
|
8
|
-
GenericTransformer.scalar({
|
|
9
|
-
...props,
|
|
10
|
-
method: "json.isParse",
|
|
11
|
-
write: JsonIsParseProgrammer.write,
|
|
12
|
-
});
|
|
13
|
-
}
|
|
1
|
+
import { JsonIsParseProgrammer } from "../../../programmers/json/JsonIsParseProgrammer";
|
|
2
|
+
|
|
3
|
+
import { ITransformProps } from "../../ITransformProps";
|
|
4
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
5
|
+
|
|
6
|
+
export namespace JsonIsParseTransformer {
|
|
7
|
+
export const transform = (props: ITransformProps) =>
|
|
8
|
+
GenericTransformer.scalar({
|
|
9
|
+
...props,
|
|
10
|
+
method: "json.isParse",
|
|
11
|
+
write: JsonIsParseProgrammer.write,
|
|
12
|
+
});
|
|
13
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { JsonIsStringifyProgrammer } from "../../../programmers/json/JsonIsStringifyProgrammer";
|
|
2
|
-
|
|
3
|
-
import { ITransformProps } from "../../ITransformProps";
|
|
4
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
5
|
-
|
|
6
|
-
export namespace JsonIsStringifyTransformer {
|
|
7
|
-
export const transform = (props: ITransformProps) =>
|
|
8
|
-
GenericTransformer.scalar({
|
|
9
|
-
...props,
|
|
10
|
-
method: "json.isStringify",
|
|
11
|
-
write: JsonIsStringifyProgrammer.write,
|
|
12
|
-
});
|
|
13
|
-
}
|
|
1
|
+
import { JsonIsStringifyProgrammer } from "../../../programmers/json/JsonIsStringifyProgrammer";
|
|
2
|
+
|
|
3
|
+
import { ITransformProps } from "../../ITransformProps";
|
|
4
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
5
|
+
|
|
6
|
+
export namespace JsonIsStringifyTransformer {
|
|
7
|
+
export const transform = (props: ITransformProps) =>
|
|
8
|
+
GenericTransformer.scalar({
|
|
9
|
+
...props,
|
|
10
|
+
method: "json.isStringify",
|
|
11
|
+
write: JsonIsStringifyProgrammer.write,
|
|
12
|
+
});
|
|
13
|
+
}
|