@typia/transform 12.0.0-dev.20260309 → 12.0.0-dev.20260310
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/package.json +4 -4
- package/src/CallExpressionTransformer.ts +579 -579
- package/src/FileTransformer.ts +143 -143
- package/src/ITransformProps.ts +20 -20
- package/src/ImportTransformer.ts +262 -262
- package/src/NodeTransformer.ts +25 -25
- package/src/TransformerError.ts +85 -85
- package/src/TypiaGenerator.ts +172 -172
- package/src/features/AssertTransformer.ts +24 -24
- package/src/features/CreateAssertTransformer.ts +24 -24
- package/src/features/CreateIsTransformer.ts +18 -18
- package/src/features/CreateRandomTransformer.ts +42 -42
- package/src/features/CreateValidateTransformer.ts +18 -18
- package/src/features/IsTransformer.ts +18 -18
- package/src/features/RandomTransformer.ts +40 -40
- package/src/features/ValidateTransformer.ts +18 -18
- package/src/features/functional/FunctionalGenericTransformer.ts +55 -55
- package/src/features/http/CreateHttpAssertFormDataTransformer.ts +13 -13
- package/src/features/http/CreateHttpAssertHeadersTransformer.ts +13 -13
- package/src/features/http/CreateHttpAssertQueryTransformer.ts +13 -13
- package/src/features/http/CreateHttpFormDataTransformer.ts +13 -13
- package/src/features/http/CreateHttpHeadersTransformer.ts +13 -13
- package/src/features/http/CreateHttpIsFormDataTransformer.ts +13 -13
- package/src/features/http/CreateHttpIsHeadersTransformer.ts +13 -13
- package/src/features/http/CreateHttpIsQueryTransformer.ts +13 -13
- package/src/features/http/CreateHttpParameterTransformer.ts +13 -13
- package/src/features/http/CreateHttpQueryTransformer.ts +13 -13
- package/src/features/http/CreateHttpValidateFormDataTransformer.ts +13 -13
- package/src/features/http/CreateHttpValidateHeadersTransformer.ts +13 -13
- package/src/features/http/CreateHttpValidateQueryTransformer.ts +13 -13
- package/src/features/http/HttpAssertFormDataTransformer.ts +13 -13
- package/src/features/http/HttpAssertHeadersTransformer.ts +13 -13
- package/src/features/http/HttpAssertQueryTransformer.ts +13 -13
- package/src/features/http/HttpFormDataTransformer.ts +13 -13
- package/src/features/http/HttpHeadersTransformer.ts +13 -13
- package/src/features/http/HttpIsFormDataTransformer.ts +13 -13
- package/src/features/http/HttpIsHeadersTransformer.ts +13 -13
- package/src/features/http/HttpIsQueryTransformer.ts +13 -13
- package/src/features/http/HttpParameterTransformer.ts +13 -13
- package/src/features/http/HttpQueryTransformer.ts +13 -13
- package/src/features/http/HttpValidateFormDataTransformer.ts +13 -13
- package/src/features/http/HttpValidateHeadersTransformer.ts +13 -13
- package/src/features/http/HttpValidateQueryTransformer.ts +13 -13
- package/src/features/json/JsonApplicationTransformer.ts +99 -99
- package/src/features/json/JsonAssertParseTransformer.ts +13 -13
- package/src/features/json/JsonAssertStringifyTransformer.ts +13 -13
- package/src/features/json/JsonCreateAssertParseTransformer.ts +13 -13
- package/src/features/json/JsonCreateAssertStringifyTransformer.ts +13 -13
- package/src/features/json/JsonCreateIsParseTransformer.ts +13 -13
- package/src/features/json/JsonCreateIsStringifyTransformer.ts +13 -13
- package/src/features/json/JsonCreateStringifyTransformer.ts +13 -13
- package/src/features/json/JsonCreateValidateParseTransformer.ts +13 -13
- package/src/features/json/JsonCreateValidateStringifyProgrammer.ts +13 -13
- package/src/features/json/JsonIsParseTransformer.ts +13 -13
- package/src/features/json/JsonIsStringifyTransformer.ts +13 -13
- package/src/features/json/JsonSchemaTransformer.ts +120 -120
- package/src/features/json/JsonSchemasTransformer.ts +130 -130
- package/src/features/json/JsonStringifyTransformer.ts +13 -13
- package/src/features/json/JsonValidateParseTransformer.ts +13 -13
- package/src/features/json/JsonValidateStringifyTransformer.ts +13 -13
- package/src/features/llm/LlmApplicationTransformer.ts +224 -224
- package/src/features/llm/LlmCoerceTransformer.ts +95 -95
- package/src/features/llm/LlmControllerTransformer.ts +81 -81
- package/src/features/llm/LlmCreateCoerceTransformer.ts +84 -84
- package/src/features/llm/LlmCreateParseTransformer.ts +84 -84
- package/src/features/llm/LlmParametersTransformer.ts +76 -76
- package/src/features/llm/LlmParseTransformer.ts +95 -95
- package/src/features/llm/LlmSchemaTransformer.ts +87 -87
- package/src/features/misc/MiscAssertCloneTransformer.ts +13 -13
- package/src/features/misc/MiscAssertPruneTransformer.ts +13 -13
- package/src/features/misc/MiscCloneTransformer.ts +13 -13
- package/src/features/misc/MiscCreateAssertCloneTransformer.ts +13 -13
- package/src/features/misc/MiscCreateAssertPruneTransformer.ts +13 -13
- package/src/features/misc/MiscCreateCloneTransformer.ts +13 -13
- package/src/features/misc/MiscCreateIsCloneTransformer.ts +13 -13
- package/src/features/misc/MiscCreateIsPruneTransformer.ts +13 -13
- package/src/features/misc/MiscCreatePruneTransformer.ts +13 -13
- package/src/features/misc/MiscCreateValidateCloneTransformer.ts +13 -13
- package/src/features/misc/MiscCreateValidatePruneTransformer.ts +13 -13
- package/src/features/misc/MiscIsCloneTransformer.ts +13 -13
- package/src/features/misc/MiscIsPruneTransformer.ts +13 -13
- package/src/features/misc/MiscLiteralsTransformer.ts +34 -34
- package/src/features/misc/MiscPruneTransformer.ts +13 -13
- package/src/features/misc/MiscValidateCloneTransformer.ts +13 -13
- package/src/features/misc/MiscValidatePruneTransformer.ts +13 -13
- package/src/features/notations/NotationAssertGeneralTransformer.ts +19 -19
- package/src/features/notations/NotationCreateAssertGeneralTransformer.ts +19 -19
- package/src/features/notations/NotationCreateGeneralTransformer.ts +19 -19
- package/src/features/notations/NotationCreateIsGeneralTransformer.ts +19 -19
- package/src/features/notations/NotationCreateValidateGeneralTransformer.ts +19 -19
- package/src/features/notations/NotationGeneralTransformer.ts +18 -18
- package/src/features/notations/NotationIsGeneralTransformer.ts +19 -19
- package/src/features/notations/NotationValidateGeneralTransformer.ts +19 -19
- package/src/features/protobuf/ProtobufAssertDecodeTransformer.ts +13 -13
- package/src/features/protobuf/ProtobufAssertEncodeTransformer.ts +13 -13
- package/src/features/protobuf/ProtobufCreateAssertDecodeTransformer.ts +13 -13
- package/src/features/protobuf/ProtobufCreateAssertEncodeTransformer.ts +13 -13
- package/src/features/protobuf/ProtobufCreateDecodeTransformer.ts +13 -13
- package/src/features/protobuf/ProtobufCreateEncodeTransformer.ts +13 -13
- package/src/features/protobuf/ProtobufCreateIsDecodeTransformer.ts +13 -13
- package/src/features/protobuf/ProtobufCreateIsEncodeTransformer.ts +13 -13
- package/src/features/protobuf/ProtobufCreateValidateDecodeTransformer.ts +13 -13
- package/src/features/protobuf/ProtobufCreateValidateEncodeTransformer.ts +13 -13
- package/src/features/protobuf/ProtobufDecodeTransformer.ts +13 -13
- package/src/features/protobuf/ProtobufEncodeTransformer.ts +13 -13
- package/src/features/protobuf/ProtobufIsDecodeTransformer.ts +13 -13
- package/src/features/protobuf/ProtobufIsEncodeTransformer.ts +13 -13
- package/src/features/protobuf/ProtobufMessageTransformer.ts +34 -34
- package/src/features/protobuf/ProtobufValidateDecodeTransformer.ts +13 -13
- package/src/features/protobuf/ProtobufValidateEncodeTransformer.ts +13 -13
- package/src/features/reflect/ReflectMetadataTransformer.ts +69 -69
- package/src/features/reflect/ReflectNameTransformer.ts +81 -81
- package/src/features/reflect/ReflectSchemaTransformer.ts +65 -65
- package/src/features/reflect/ReflectSchemasTransformer.ts +69 -69
- package/src/index.ts +7 -7
- package/src/internal/GenericTransformer.ts +101 -101
- package/src/transform.ts +68 -68
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
import {
|
|
2
|
-
JsonApplicationProgrammer,
|
|
3
|
-
MetadataCollection,
|
|
4
|
-
MetadataFactory,
|
|
5
|
-
MetadataSchema,
|
|
6
|
-
} from "@typia/core";
|
|
7
|
-
import { ValidationPipe } from "@typia/interface";
|
|
8
|
-
import ts from "typescript";
|
|
9
|
-
|
|
10
|
-
import { ITransformProps } from "../../ITransformProps";
|
|
11
|
-
import { TransformerError } from "../../TransformerError";
|
|
12
|
-
|
|
13
|
-
export namespace JsonApplicationTransformer {
|
|
14
|
-
export const transform = (props: ITransformProps): ts.Expression => {
|
|
15
|
-
// GET GENERIC ARGUMENT
|
|
16
|
-
if (!props.expression.typeArguments?.length)
|
|
17
|
-
throw new TransformerError({
|
|
18
|
-
code: "typia.json.application",
|
|
19
|
-
message: "no generic argument.",
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
const top: ts.Node = props.expression.typeArguments[0]!;
|
|
23
|
-
if (ts.isTypeNode(top) === false) return props.expression;
|
|
24
|
-
|
|
25
|
-
const version: "3.0" | "3.1" = get_parameter<"3.0" | "3.1">({
|
|
26
|
-
checker: props.context.checker,
|
|
27
|
-
name: "Version",
|
|
28
|
-
is: (str) => str === "3.0" || str === "3.1",
|
|
29
|
-
cast: (str) => str as "3.0" | "3.1",
|
|
30
|
-
default: () => "3.1",
|
|
31
|
-
})(props.expression.typeArguments[1]);
|
|
32
|
-
|
|
33
|
-
// GET TYPE
|
|
34
|
-
const type: ts.Type = props.context.checker.getTypeFromTypeNode(top);
|
|
35
|
-
const collection: MetadataCollection = new MetadataCollection({
|
|
36
|
-
replace: MetadataCollection.replace,
|
|
37
|
-
});
|
|
38
|
-
const result: ValidationPipe<MetadataSchema, MetadataFactory.IError> =
|
|
39
|
-
MetadataFactory.analyze({
|
|
40
|
-
checker: props.context.checker,
|
|
41
|
-
transformer: props.context.transformer,
|
|
42
|
-
options: {
|
|
43
|
-
escape: true,
|
|
44
|
-
constant: true,
|
|
45
|
-
absorb: false,
|
|
46
|
-
functional: true,
|
|
47
|
-
validate: JsonApplicationProgrammer.validate,
|
|
48
|
-
},
|
|
49
|
-
components: collection,
|
|
50
|
-
type,
|
|
51
|
-
});
|
|
52
|
-
if (result.success === false)
|
|
53
|
-
throw TransformerError.from({
|
|
54
|
-
code: "typia.json.application",
|
|
55
|
-
errors: result.errors,
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
// GENERATE JSON APPLICATION
|
|
59
|
-
return JsonApplicationProgrammer.write({
|
|
60
|
-
context: props.context,
|
|
61
|
-
version,
|
|
62
|
-
metadata: result.data,
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
const get_parameter =
|
|
67
|
-
<Value>(props: {
|
|
68
|
-
checker: ts.TypeChecker;
|
|
69
|
-
name: string;
|
|
70
|
-
is: (value: string) => boolean;
|
|
71
|
-
cast: (value: string) => Value;
|
|
72
|
-
default: () => Value;
|
|
73
|
-
}) =>
|
|
74
|
-
(node: ts.TypeNode | undefined): Value => {
|
|
75
|
-
if (!node) return props.default();
|
|
76
|
-
|
|
77
|
-
// CHECK LITERAL TYPE
|
|
78
|
-
const type: ts.Type = props.checker.getTypeFromTypeNode(node);
|
|
79
|
-
if (
|
|
80
|
-
!type.isLiteral() &&
|
|
81
|
-
(type.getFlags() & ts.TypeFlags.BooleanLiteral) === 0
|
|
82
|
-
)
|
|
83
|
-
throw new TransformerError({
|
|
84
|
-
code: "typia.json.application",
|
|
85
|
-
message: `generic argument "${props.name}" must be constant.`,
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
// GET VALUE AND VALIDATE IT
|
|
89
|
-
const value = type.isLiteral()
|
|
90
|
-
? type.value
|
|
91
|
-
: props.checker.typeToString(type);
|
|
92
|
-
if (typeof value !== "string" || props.is(value) === false)
|
|
93
|
-
throw new TransformerError({
|
|
94
|
-
code: "typia.json.application",
|
|
95
|
-
message: `invalid value on generic argument "${props.name}".`,
|
|
96
|
-
});
|
|
97
|
-
return props.cast(value);
|
|
98
|
-
};
|
|
99
|
-
}
|
|
1
|
+
import {
|
|
2
|
+
JsonApplicationProgrammer,
|
|
3
|
+
MetadataCollection,
|
|
4
|
+
MetadataFactory,
|
|
5
|
+
MetadataSchema,
|
|
6
|
+
} from "@typia/core";
|
|
7
|
+
import { ValidationPipe } from "@typia/interface";
|
|
8
|
+
import ts from "typescript";
|
|
9
|
+
|
|
10
|
+
import { ITransformProps } from "../../ITransformProps";
|
|
11
|
+
import { TransformerError } from "../../TransformerError";
|
|
12
|
+
|
|
13
|
+
export namespace JsonApplicationTransformer {
|
|
14
|
+
export const transform = (props: ITransformProps): ts.Expression => {
|
|
15
|
+
// GET GENERIC ARGUMENT
|
|
16
|
+
if (!props.expression.typeArguments?.length)
|
|
17
|
+
throw new TransformerError({
|
|
18
|
+
code: "typia.json.application",
|
|
19
|
+
message: "no generic argument.",
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const top: ts.Node = props.expression.typeArguments[0]!;
|
|
23
|
+
if (ts.isTypeNode(top) === false) return props.expression;
|
|
24
|
+
|
|
25
|
+
const version: "3.0" | "3.1" = get_parameter<"3.0" | "3.1">({
|
|
26
|
+
checker: props.context.checker,
|
|
27
|
+
name: "Version",
|
|
28
|
+
is: (str) => str === "3.0" || str === "3.1",
|
|
29
|
+
cast: (str) => str as "3.0" | "3.1",
|
|
30
|
+
default: () => "3.1",
|
|
31
|
+
})(props.expression.typeArguments[1]);
|
|
32
|
+
|
|
33
|
+
// GET TYPE
|
|
34
|
+
const type: ts.Type = props.context.checker.getTypeFromTypeNode(top);
|
|
35
|
+
const collection: MetadataCollection = new MetadataCollection({
|
|
36
|
+
replace: MetadataCollection.replace,
|
|
37
|
+
});
|
|
38
|
+
const result: ValidationPipe<MetadataSchema, MetadataFactory.IError> =
|
|
39
|
+
MetadataFactory.analyze({
|
|
40
|
+
checker: props.context.checker,
|
|
41
|
+
transformer: props.context.transformer,
|
|
42
|
+
options: {
|
|
43
|
+
escape: true,
|
|
44
|
+
constant: true,
|
|
45
|
+
absorb: false,
|
|
46
|
+
functional: true,
|
|
47
|
+
validate: JsonApplicationProgrammer.validate,
|
|
48
|
+
},
|
|
49
|
+
components: collection,
|
|
50
|
+
type,
|
|
51
|
+
});
|
|
52
|
+
if (result.success === false)
|
|
53
|
+
throw TransformerError.from({
|
|
54
|
+
code: "typia.json.application",
|
|
55
|
+
errors: result.errors,
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
// GENERATE JSON APPLICATION
|
|
59
|
+
return JsonApplicationProgrammer.write({
|
|
60
|
+
context: props.context,
|
|
61
|
+
version,
|
|
62
|
+
metadata: result.data,
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
const get_parameter =
|
|
67
|
+
<Value>(props: {
|
|
68
|
+
checker: ts.TypeChecker;
|
|
69
|
+
name: string;
|
|
70
|
+
is: (value: string) => boolean;
|
|
71
|
+
cast: (value: string) => Value;
|
|
72
|
+
default: () => Value;
|
|
73
|
+
}) =>
|
|
74
|
+
(node: ts.TypeNode | undefined): Value => {
|
|
75
|
+
if (!node) return props.default();
|
|
76
|
+
|
|
77
|
+
// CHECK LITERAL TYPE
|
|
78
|
+
const type: ts.Type = props.checker.getTypeFromTypeNode(node);
|
|
79
|
+
if (
|
|
80
|
+
!type.isLiteral() &&
|
|
81
|
+
(type.getFlags() & ts.TypeFlags.BooleanLiteral) === 0
|
|
82
|
+
)
|
|
83
|
+
throw new TransformerError({
|
|
84
|
+
code: "typia.json.application",
|
|
85
|
+
message: `generic argument "${props.name}" must be constant.`,
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
// GET VALUE AND VALIDATE IT
|
|
89
|
+
const value = type.isLiteral()
|
|
90
|
+
? type.value
|
|
91
|
+
: props.checker.typeToString(type);
|
|
92
|
+
if (typeof value !== "string" || props.is(value) === false)
|
|
93
|
+
throw new TransformerError({
|
|
94
|
+
code: "typia.json.application",
|
|
95
|
+
message: `invalid value on generic argument "${props.name}".`,
|
|
96
|
+
});
|
|
97
|
+
return props.cast(value);
|
|
98
|
+
};
|
|
99
|
+
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { JsonAssertParseProgrammer } from "@typia/core";
|
|
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 "@typia/core";
|
|
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 "@typia/core";
|
|
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 "@typia/core";
|
|
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 "@typia/core";
|
|
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 "@typia/core";
|
|
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 "@typia/core";
|
|
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 "@typia/core";
|
|
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 "@typia/core";
|
|
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 "@typia/core";
|
|
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 "@typia/core";
|
|
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 "@typia/core";
|
|
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 "@typia/core";
|
|
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 "@typia/core";
|
|
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 "@typia/core";
|
|
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 "@typia/core";
|
|
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 "@typia/core";
|
|
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 "@typia/core";
|
|
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 "@typia/core";
|
|
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 "@typia/core";
|
|
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 "@typia/core";
|
|
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 "@typia/core";
|
|
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
|
+
}
|