typia 4.0.0-dev.20230520 → 4.0.0-dev.20230527
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/transform.js +1 -1
- package/lib/transform.js.map +1 -1
- package/package.json +1 -1
- package/src/CustomValidatorMap.ts +126 -126
- package/src/IRandomGenerator.ts +33 -33
- package/src/IValidation.ts +21 -21
- package/src/Primitive.ts +123 -123
- package/src/TypeGuardError.ts +36 -36
- package/src/executable/TypiaGenerateWizard.ts +85 -85
- package/src/executable/TypiaSetupWizard.ts +133 -133
- package/src/executable/setup/ArgumentParser.ts +45 -45
- package/src/executable/setup/CommandExecutor.ts +8 -8
- package/src/executable/setup/FileRetriever.ts +22 -22
- package/src/executable/setup/PackageManager.ts +71 -71
- package/src/executable/setup/PluginConfigurator.ts +70 -70
- package/src/executable/typia.ts +52 -52
- package/src/factories/CommentFactory.ts +14 -14
- package/src/factories/ExpressionFactory.ts +77 -77
- package/src/factories/IdentifierFactory.ts +62 -62
- package/src/factories/LiteralFactory.ts +57 -57
- package/src/factories/MetadataCollection.ts +123 -123
- package/src/factories/MetadataFactory.ts +53 -53
- package/src/factories/MetadataTagFactory.ts +295 -295
- package/src/factories/StatementFactory.ts +20 -20
- package/src/factories/TemplateFactory.ts +64 -64
- package/src/factories/TypeFactory.ts +145 -145
- package/src/factories/ValueFactory.ts +15 -15
- package/src/factories/internal/metadata/MetadataHelper.ts +12 -12
- package/src/factories/internal/metadata/emplace_metadata_object.ts +152 -152
- package/src/factories/internal/metadata/explore_metadata.ts +93 -93
- package/src/factories/internal/metadata/iterate_metadata.ts +63 -63
- package/src/factories/internal/metadata/iterate_metadata_array.ts +32 -32
- package/src/factories/internal/metadata/iterate_metadata_atomic.ts +59 -59
- package/src/factories/internal/metadata/iterate_metadata_coalesce.ts +33 -33
- package/src/factories/internal/metadata/iterate_metadata_constant.ts +62 -62
- package/src/factories/internal/metadata/iterate_metadata_map.ts +41 -41
- package/src/factories/internal/metadata/iterate_metadata_native.ts +217 -217
- package/src/factories/internal/metadata/iterate_metadata_object.ts +51 -51
- package/src/factories/internal/metadata/iterate_metadata_resolve.ts +30 -30
- package/src/factories/internal/metadata/iterate_metadata_set.ts +36 -36
- package/src/factories/internal/metadata/iterate_metadata_template.ts +40 -40
- package/src/factories/internal/metadata/iterate_metadata_tuple.ts +51 -51
- package/src/factories/internal/metadata/iterate_metadata_union.ts +59 -59
- package/src/functional/$any.ts +2 -2
- package/src/functional/$dictionary.ts +25 -25
- package/src/functional/$every.ts +11 -11
- package/src/functional/$guard.ts +35 -35
- package/src/functional/$is_between.ts +2 -2
- package/src/functional/$is_custom.ts +14 -14
- package/src/functional/$is_date.ts +3 -3
- package/src/functional/$is_datetime.ts +2 -2
- package/src/functional/$is_email.ts +4 -4
- package/src/functional/$is_ipv4.ts +4 -4
- package/src/functional/$is_ipv6.ts +4 -4
- package/src/functional/$is_url.ts +4 -4
- package/src/functional/$is_uuid.ts +4 -4
- package/src/functional/$join.ts +46 -46
- package/src/functional/$number.ts +12 -12
- package/src/functional/$report.ts +15 -15
- package/src/functional/$rest.ts +3 -3
- package/src/functional/$string.ts +37 -37
- package/src/functional/$tail.ts +5 -5
- package/src/functional/Namespace.ts +127 -127
- package/src/index.ts +4 -4
- package/src/metadata/ICommentTag.ts +4 -4
- package/src/metadata/IJsDocTagInfo.ts +10 -10
- package/src/metadata/IMetadata.ts +26 -26
- package/src/metadata/IMetadataApplication.ts +7 -7
- package/src/metadata/IMetadataConstant.ts +16 -16
- package/src/metadata/IMetadataEntry.ts +6 -6
- package/src/metadata/IMetadataObject.ts +29 -29
- package/src/metadata/IMetadataProperty.ts +11 -11
- package/src/metadata/IMetadataTag.ts +105 -105
- package/src/metadata/Metadata.ts +539 -539
- package/src/metadata/MetadataConstant.ts +3 -3
- package/src/metadata/MetadataObject.ts +127 -127
- package/src/metadata/MetadataProperty.ts +64 -64
- package/src/module.ts +2038 -2038
- package/src/programmers/ApplicationProgrammer.ts +48 -48
- package/src/programmers/AssertCloneProgrammer.ts +68 -68
- package/src/programmers/AssertParseProgrammer.ts +66 -66
- package/src/programmers/AssertProgrammer.ts +274 -274
- package/src/programmers/AssertPruneProgrammer.ts +73 -73
- package/src/programmers/AssertStringifyProgrammer.ts +66 -66
- package/src/programmers/CheckerProgrammer.ts +897 -897
- package/src/programmers/CloneProgrammer.ts +387 -387
- package/src/programmers/FeatureProgrammer.ts +510 -510
- package/src/programmers/IsCloneProgrammer.ts +79 -79
- package/src/programmers/IsParseProgrammer.ts +72 -72
- package/src/programmers/IsProgrammer.ts +223 -223
- package/src/programmers/IsPruneProgrammer.ts +83 -83
- package/src/programmers/IsStringifyProgrammer.ts +77 -77
- package/src/programmers/LiteralsProgrammer.ts +65 -65
- package/src/programmers/PruneProgrammer.ts +348 -348
- package/src/programmers/RandomProgrammer.ts +444 -444
- package/src/programmers/StringifyProgrammer.ts +758 -758
- package/src/programmers/TypiaProgrammer.ts +141 -141
- package/src/programmers/ValidateCloneProgrammer.ts +93 -93
- package/src/programmers/ValidateParseProgrammer.ts +78 -78
- package/src/programmers/ValidateProgrammer.ts +317 -317
- package/src/programmers/ValidatePruneProgrammer.ts +86 -86
- package/src/programmers/ValidateStringifyProgrammer.ts +93 -93
- package/src/programmers/helpers/AtomicPredicator.ts +31 -31
- package/src/programmers/helpers/CloneJoiner.ts +138 -138
- package/src/programmers/helpers/FunctionImporeter.ts +56 -56
- package/src/programmers/helpers/ICheckEntry.ts +12 -12
- package/src/programmers/helpers/IExpressionEntry.ts +12 -12
- package/src/programmers/helpers/OptionPredicator.ts +15 -15
- package/src/programmers/helpers/PruneJoiner.ts +156 -156
- package/src/programmers/helpers/RandomJoiner.ts +165 -165
- package/src/programmers/helpers/RandomRanger.ts +218 -218
- package/src/programmers/helpers/StringifyJoinder.ts +118 -118
- package/src/programmers/helpers/StringifyPredicator.ts +12 -12
- package/src/programmers/helpers/UnionExplorer.ts +281 -281
- package/src/programmers/helpers/UnionPredicator.ts +81 -81
- package/src/programmers/helpers/disable_function_importer_declare.ts +21 -21
- package/src/programmers/internal/JSON_SCHEMA_PREFIX.ts +1 -1
- package/src/programmers/internal/application_array.ts +32 -32
- package/src/programmers/internal/application_boolean.ts +15 -15
- package/src/programmers/internal/application_constant.ts +26 -26
- package/src/programmers/internal/application_default.ts +17 -17
- package/src/programmers/internal/application_default_string.ts +33 -33
- package/src/programmers/internal/application_native.ts +36 -36
- package/src/programmers/internal/application_number.ts +71 -71
- package/src/programmers/internal/application_object.ts +162 -162
- package/src/programmers/internal/application_schema.ts +198 -198
- package/src/programmers/internal/application_string.ts +44 -44
- package/src/programmers/internal/application_templates.ts +25 -25
- package/src/programmers/internal/application_tuple.ts +27 -27
- package/src/programmers/internal/check_array.ts +31 -31
- package/src/programmers/internal/check_array_length.ts +35 -35
- package/src/programmers/internal/check_bigint.ts +95 -95
- package/src/programmers/internal/check_custom.ts +32 -32
- package/src/programmers/internal/check_dynamic_properties.ts +198 -198
- package/src/programmers/internal/check_everything.ts +28 -28
- package/src/programmers/internal/check_native.ts +22 -22
- package/src/programmers/internal/check_number.ts +177 -177
- package/src/programmers/internal/check_object.ts +65 -65
- package/src/programmers/internal/check_string.ts +27 -27
- package/src/programmers/internal/check_string_tags.ts +68 -68
- package/src/programmers/internal/check_template.ts +57 -57
- package/src/programmers/internal/check_union_array_like.ts +273 -273
- package/src/programmers/internal/check_union_tuple.ts +34 -34
- package/src/programmers/internal/decode_union_object.ts +75 -75
- package/src/programmers/internal/feature_object_entries.ts +64 -64
- package/src/programmers/internal/get_comment_tags.ts +23 -23
- package/src/programmers/internal/metadata_to_pattern.ts +34 -34
- package/src/programmers/internal/prune_object_properties.ts +63 -63
- package/src/programmers/internal/random_custom.ts +30 -30
- package/src/programmers/internal/stringify_dynamic_properties.ts +173 -173
- package/src/programmers/internal/stringify_native.ts +7 -7
- package/src/programmers/internal/stringify_regular_properties.ts +89 -89
- package/src/programmers/internal/template_to_pattern.ts +15 -15
- package/src/schemas/IJsonApplication.ts +13 -13
- package/src/schemas/IJsonComponents.ts +33 -33
- package/src/schemas/IJsonSchema.ts +134 -134
- package/src/transform.ts +39 -39
- package/src/transformers/CallExpressionTransformer.ts +183 -183
- package/src/transformers/FileTransformer.ts +50 -50
- package/src/transformers/IProject.ts +18 -18
- package/src/transformers/ITransformOptions.ts +62 -62
- package/src/transformers/ImportTransformer.ts +74 -74
- package/src/transformers/NodeTransformer.ts +13 -13
- package/src/transformers/features/miscellaneous/ApplicationTransformer.ts +107 -107
- package/src/transformers/features/miscellaneous/AssertCloneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/AssertPruneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/CloneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/CreateAssertCloneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/CreateAssertPruneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/CreateCloneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/CreateIsCloneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/CreateIsPruneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/CreatePruneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/CreateRandomTransformer.ts +43 -43
- package/src/transformers/features/miscellaneous/CreateValidateCloneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/CreateValidatePruneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/IsCloneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/IsPruneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/LiteralsTransformer.ts +31 -31
- package/src/transformers/features/miscellaneous/MetadataTransformer.ts +56 -56
- package/src/transformers/features/miscellaneous/PruneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/RandomTransformer.ts +46 -46
- package/src/transformers/features/miscellaneous/ValidateCloneTransformer.ts +9 -9
- package/src/transformers/features/miscellaneous/ValidatePruneTransformer.ts +9 -9
- package/src/transformers/features/parsers/AssertParseTransformer.ts +9 -9
- package/src/transformers/features/parsers/CreateAssertParseTransformer.ts +9 -9
- package/src/transformers/features/parsers/CreateIsParseTransformer.ts +9 -9
- package/src/transformers/features/parsers/CreateValidateParseTransformer.ts +9 -9
- package/src/transformers/features/parsers/IsParseTransformer.ts +9 -9
- package/src/transformers/features/parsers/ValidateParseTransformer.ts +9 -9
- package/src/transformers/features/stringifiers/AssertStringifyTransformer.ts +10 -10
- package/src/transformers/features/stringifiers/CreateAssertStringifyTransformer.ts +12 -12
- package/src/transformers/features/stringifiers/CreateIsStringifyTransformer.ts +9 -9
- package/src/transformers/features/stringifiers/CreateStringifyTransformer.ts +9 -9
- package/src/transformers/features/stringifiers/CreateValidateStringifyProgrammer.ts +12 -12
- package/src/transformers/features/stringifiers/IsStringifyTransformer.ts +9 -9
- package/src/transformers/features/stringifiers/StringifyTransformer.ts +9 -9
- package/src/transformers/features/stringifiers/ValidateStringifyTransformer.ts +10 -10
- package/src/transformers/features/validators/AssertTransformer.ts +11 -11
- package/src/transformers/features/validators/CreateAssertTransformer.ts +13 -13
- package/src/transformers/features/validators/CreateIsTransformer.ts +11 -11
- package/src/transformers/features/validators/CreateValidateTransformer.ts +13 -13
- package/src/transformers/features/validators/IsTransformer.ts +11 -11
- package/src/transformers/features/validators/ValidateTransformer.ts +11 -11
- package/src/transformers/internal/GenericTransformer.ts +101 -101
- package/src/typings/Atomic.ts +17 -17
- package/src/typings/ClassProperties.ts +5 -5
- package/src/typings/Customizable.ts +5 -5
- package/src/typings/OmitNever.ts +3 -3
- package/src/typings/SpecialFields.ts +3 -3
- package/src/typings/Writable.ts +11 -11
- package/src/utils/ArrayUtil.ts +44 -44
- package/src/utils/Escaper.ts +45 -45
- package/src/utils/MapUtil.ts +12 -12
- package/src/utils/PatternUtil.ts +30 -30
- package/src/utils/RandomGenerator.ts +81 -81
- package/src/utils/Singleton.ts +17 -17
- package/src/utils/TsNodeUtil.ts +17 -17
- package/src/utils/TsSymbolUtil.ts +153 -153
- package/src/utils/TsTypeUtil.ts +38 -38
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import type ts from "typescript/lib/tsclibrary";
|
|
2
|
-
|
|
3
|
-
import { RandomProgrammer } from "../../../programmers/RandomProgrammer";
|
|
4
|
-
|
|
5
|
-
import { TsNodeUtil } from "../../../utils/TsNodeUtil";
|
|
6
|
-
import { TsTypeUtil } from "../../../utils/TsTypeUtil";
|
|
7
|
-
|
|
8
|
-
import { IProject } from "../../IProject";
|
|
9
|
-
|
|
10
|
-
export namespace CreateRandomTransformer {
|
|
11
|
-
export const transform =
|
|
12
|
-
(p: IProject) =>
|
|
13
|
-
(modulo: ts.LeftHandSideExpression) =>
|
|
14
|
-
(expression: ts.CallExpression): ts.Expression => {
|
|
15
|
-
// CHECK GENERIC ARGUMENT EXISTENCE
|
|
16
|
-
if (!expression.typeArguments?.[0]) throw new Error(NOT_SPECIFIED);
|
|
17
|
-
|
|
18
|
-
// GET TYPE INFO
|
|
19
|
-
const node: ts.TypeNode = expression.typeArguments[0];
|
|
20
|
-
const type: ts.Type = p.checker.getTypeFromTypeNode(node);
|
|
21
|
-
|
|
22
|
-
if (TsTypeUtil.isTypeParameter(p.tsc)(type))
|
|
23
|
-
throw new Error(NO_GENERIC_ARGUMENT);
|
|
24
|
-
|
|
25
|
-
// DO TRANSFORM
|
|
26
|
-
return RandomProgrammer.write({
|
|
27
|
-
...p,
|
|
28
|
-
options: {
|
|
29
|
-
...p.options,
|
|
30
|
-
functional: false,
|
|
31
|
-
numeric: false,
|
|
32
|
-
},
|
|
33
|
-
})(modulo)(expression.arguments?.[0])(
|
|
34
|
-
type,
|
|
35
|
-
TsNodeUtil.getFullText(p.tsc)(node).trim(),
|
|
36
|
-
);
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const NOT_SPECIFIED =
|
|
41
|
-
"Error on typia.createRandom(): generic argument is not specified.";
|
|
42
|
-
const NO_GENERIC_ARGUMENT =
|
|
43
|
-
"Error on typia.createRandom(): non-specified generic argument.";
|
|
1
|
+
import type ts from "typescript/lib/tsclibrary";
|
|
2
|
+
|
|
3
|
+
import { RandomProgrammer } from "../../../programmers/RandomProgrammer";
|
|
4
|
+
|
|
5
|
+
import { TsNodeUtil } from "../../../utils/TsNodeUtil";
|
|
6
|
+
import { TsTypeUtil } from "../../../utils/TsTypeUtil";
|
|
7
|
+
|
|
8
|
+
import { IProject } from "../../IProject";
|
|
9
|
+
|
|
10
|
+
export namespace CreateRandomTransformer {
|
|
11
|
+
export const transform =
|
|
12
|
+
(p: IProject) =>
|
|
13
|
+
(modulo: ts.LeftHandSideExpression) =>
|
|
14
|
+
(expression: ts.CallExpression): ts.Expression => {
|
|
15
|
+
// CHECK GENERIC ARGUMENT EXISTENCE
|
|
16
|
+
if (!expression.typeArguments?.[0]) throw new Error(NOT_SPECIFIED);
|
|
17
|
+
|
|
18
|
+
// GET TYPE INFO
|
|
19
|
+
const node: ts.TypeNode = expression.typeArguments[0];
|
|
20
|
+
const type: ts.Type = p.checker.getTypeFromTypeNode(node);
|
|
21
|
+
|
|
22
|
+
if (TsTypeUtil.isTypeParameter(p.tsc)(type))
|
|
23
|
+
throw new Error(NO_GENERIC_ARGUMENT);
|
|
24
|
+
|
|
25
|
+
// DO TRANSFORM
|
|
26
|
+
return RandomProgrammer.write({
|
|
27
|
+
...p,
|
|
28
|
+
options: {
|
|
29
|
+
...p.options,
|
|
30
|
+
functional: false,
|
|
31
|
+
numeric: false,
|
|
32
|
+
},
|
|
33
|
+
})(modulo)(expression.arguments?.[0])(
|
|
34
|
+
type,
|
|
35
|
+
TsNodeUtil.getFullText(p.tsc)(node).trim(),
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const NOT_SPECIFIED =
|
|
41
|
+
"Error on typia.createRandom(): generic argument is not specified.";
|
|
42
|
+
const NO_GENERIC_ARGUMENT =
|
|
43
|
+
"Error on typia.createRandom(): non-specified generic argument.";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ValidateCloneProgrammer } from "../../../programmers/ValidateCloneProgrammer";
|
|
2
|
-
|
|
3
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
-
|
|
5
|
-
export namespace CreateValidateCloneTransformer {
|
|
6
|
-
export const transform = GenericTransformer.factory("createValidateClone")(
|
|
7
|
-
(project) => (modulo) => ValidateCloneProgrammer.write(project)(modulo),
|
|
8
|
-
);
|
|
9
|
-
}
|
|
1
|
+
import { ValidateCloneProgrammer } from "../../../programmers/ValidateCloneProgrammer";
|
|
2
|
+
|
|
3
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
+
|
|
5
|
+
export namespace CreateValidateCloneTransformer {
|
|
6
|
+
export const transform = GenericTransformer.factory("createValidateClone")(
|
|
7
|
+
(project) => (modulo) => ValidateCloneProgrammer.write(project)(modulo),
|
|
8
|
+
);
|
|
9
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ValidatePruneProgrammer } from "../../../programmers/ValidatePruneProgrammer";
|
|
2
|
-
|
|
3
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
-
|
|
5
|
-
export namespace CreateValidatePruneTransformer {
|
|
6
|
-
export const transform = GenericTransformer.factory("createValidatePrune")(
|
|
7
|
-
(project) => (modulo) => ValidatePruneProgrammer.write(project)(modulo),
|
|
8
|
-
);
|
|
9
|
-
}
|
|
1
|
+
import { ValidatePruneProgrammer } from "../../../programmers/ValidatePruneProgrammer";
|
|
2
|
+
|
|
3
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
+
|
|
5
|
+
export namespace CreateValidatePruneTransformer {
|
|
6
|
+
export const transform = GenericTransformer.factory("createValidatePrune")(
|
|
7
|
+
(project) => (modulo) => ValidatePruneProgrammer.write(project)(modulo),
|
|
8
|
+
);
|
|
9
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IsCloneProgrammer } from "../../../programmers/IsCloneProgrammer";
|
|
2
|
-
|
|
3
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
-
|
|
5
|
-
export namespace IsCloneTransformer {
|
|
6
|
-
export const transform = GenericTransformer.scalar("isClone")(
|
|
7
|
-
(project) => (modulo) => IsCloneProgrammer.write(project)(modulo),
|
|
8
|
-
);
|
|
9
|
-
}
|
|
1
|
+
import { IsCloneProgrammer } from "../../../programmers/IsCloneProgrammer";
|
|
2
|
+
|
|
3
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
+
|
|
5
|
+
export namespace IsCloneTransformer {
|
|
6
|
+
export const transform = GenericTransformer.scalar("isClone")(
|
|
7
|
+
(project) => (modulo) => IsCloneProgrammer.write(project)(modulo),
|
|
8
|
+
);
|
|
9
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IsPruneProgrammer } from "../../../programmers/IsPruneProgrammer";
|
|
2
|
-
|
|
3
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
-
|
|
5
|
-
export namespace IsPruneTransformer {
|
|
6
|
-
export const transform = GenericTransformer.scalar("isPrune")(
|
|
7
|
-
(project) => (modulo) => IsPruneProgrammer.write(project)(modulo),
|
|
8
|
-
);
|
|
9
|
-
}
|
|
1
|
+
import { IsPruneProgrammer } from "../../../programmers/IsPruneProgrammer";
|
|
2
|
+
|
|
3
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
+
|
|
5
|
+
export namespace IsPruneTransformer {
|
|
6
|
+
export const transform = GenericTransformer.scalar("isPrune")(
|
|
7
|
+
(project) => (modulo) => IsPruneProgrammer.write(project)(modulo),
|
|
8
|
+
);
|
|
9
|
+
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import type ts from "typescript/lib/tsclibrary";
|
|
2
|
-
|
|
3
|
-
import { LiteralsProgrammer } from "../../../programmers/LiteralsProgrammer";
|
|
4
|
-
|
|
5
|
-
import { TsTypeUtil } from "../../../utils/TsTypeUtil";
|
|
6
|
-
|
|
7
|
-
import { IProject } from "../../IProject";
|
|
8
|
-
|
|
9
|
-
export namespace LiteralsTransformer {
|
|
10
|
-
export const transform =
|
|
11
|
-
(p: IProject) =>
|
|
12
|
-
(expression: ts.CallExpression): ts.Expression => {
|
|
13
|
-
// CHECK GENERIC ARGUMENT EXISTENCE
|
|
14
|
-
if (!expression.typeArguments?.[0]) throw new Error(NOT_SPECIFIED);
|
|
15
|
-
|
|
16
|
-
// GET TYPE INFO
|
|
17
|
-
const node: ts.TypeNode = expression.typeArguments[0];
|
|
18
|
-
const type: ts.Type = p.checker.getTypeFromTypeNode(node);
|
|
19
|
-
|
|
20
|
-
if (TsTypeUtil.isTypeParameter(p.tsc)(type))
|
|
21
|
-
throw new Error(NO_GENERIC_ARGUMENT);
|
|
22
|
-
|
|
23
|
-
// DO TRANSFORM
|
|
24
|
-
return LiteralsProgrammer.write(p)(type);
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const NOT_SPECIFIED =
|
|
29
|
-
"Error on typia.literals(): generic argument is not specified.";
|
|
30
|
-
const NO_GENERIC_ARGUMENT =
|
|
31
|
-
"Error on typia.literals(): non-specified generic argument.";
|
|
1
|
+
import type ts from "typescript/lib/tsclibrary";
|
|
2
|
+
|
|
3
|
+
import { LiteralsProgrammer } from "../../../programmers/LiteralsProgrammer";
|
|
4
|
+
|
|
5
|
+
import { TsTypeUtil } from "../../../utils/TsTypeUtil";
|
|
6
|
+
|
|
7
|
+
import { IProject } from "../../IProject";
|
|
8
|
+
|
|
9
|
+
export namespace LiteralsTransformer {
|
|
10
|
+
export const transform =
|
|
11
|
+
(p: IProject) =>
|
|
12
|
+
(expression: ts.CallExpression): ts.Expression => {
|
|
13
|
+
// CHECK GENERIC ARGUMENT EXISTENCE
|
|
14
|
+
if (!expression.typeArguments?.[0]) throw new Error(NOT_SPECIFIED);
|
|
15
|
+
|
|
16
|
+
// GET TYPE INFO
|
|
17
|
+
const node: ts.TypeNode = expression.typeArguments[0];
|
|
18
|
+
const type: ts.Type = p.checker.getTypeFromTypeNode(node);
|
|
19
|
+
|
|
20
|
+
if (TsTypeUtil.isTypeParameter(p.tsc)(type))
|
|
21
|
+
throw new Error(NO_GENERIC_ARGUMENT);
|
|
22
|
+
|
|
23
|
+
// DO TRANSFORM
|
|
24
|
+
return LiteralsProgrammer.write(p)(type);
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const NOT_SPECIFIED =
|
|
29
|
+
"Error on typia.literals(): generic argument is not specified.";
|
|
30
|
+
const NO_GENERIC_ARGUMENT =
|
|
31
|
+
"Error on typia.literals(): non-specified generic argument.";
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import type ts from "typescript/lib/tsclibrary";
|
|
2
|
-
|
|
3
|
-
import { LiteralFactory } from "../../../factories/LiteralFactory";
|
|
4
|
-
import { MetadataCollection } from "../../../factories/MetadataCollection";
|
|
5
|
-
import { MetadataFactory } from "../../../factories/MetadataFactory";
|
|
6
|
-
|
|
7
|
-
import { IMetadataApplication } from "../../../metadata/IMetadataApplication";
|
|
8
|
-
import { Metadata } from "../../../metadata/Metadata";
|
|
9
|
-
|
|
10
|
-
import { TsTypeUtil } from "../../../utils/TsTypeUtil";
|
|
11
|
-
|
|
12
|
-
import { IProject } from "../../IProject";
|
|
13
|
-
|
|
14
|
-
export namespace MetadataTransformer {
|
|
15
|
-
export const transform =
|
|
16
|
-
(p: IProject) =>
|
|
17
|
-
(expression: ts.CallExpression): ts.Expression => {
|
|
18
|
-
if (!expression.typeArguments?.length)
|
|
19
|
-
throw new Error(NO_GENERIC_ARGUMENT);
|
|
20
|
-
|
|
21
|
-
// VALIDATE TUPLE ARGUMENTS
|
|
22
|
-
const top: ts.Node = expression.typeArguments[0]!;
|
|
23
|
-
if (!p.tsc.isTupleTypeNode(top)) return expression;
|
|
24
|
-
else if (top.elements.some((child) => !p.tsc.isTypeNode(child)))
|
|
25
|
-
return expression;
|
|
26
|
-
|
|
27
|
-
// GET TYPES
|
|
28
|
-
const typeList: ts.Type[] = top.elements.map((child) =>
|
|
29
|
-
p.checker.getTypeFromTypeNode(child as ts.TypeNode),
|
|
30
|
-
);
|
|
31
|
-
if (
|
|
32
|
-
typeList.some((type) => TsTypeUtil.isTypeParameter(p.tsc)(type))
|
|
33
|
-
)
|
|
34
|
-
throw new Error(GENERIC_ARGUMENT);
|
|
35
|
-
|
|
36
|
-
// METADATA
|
|
37
|
-
const collection: MetadataCollection = new MetadataCollection();
|
|
38
|
-
const metadatas: Array<Metadata> = typeList.map((type) =>
|
|
39
|
-
MetadataFactory.analyze(p)({
|
|
40
|
-
resolve: false,
|
|
41
|
-
constant: true,
|
|
42
|
-
})(collection)(type),
|
|
43
|
-
);
|
|
44
|
-
|
|
45
|
-
// CONVERT TO PRIMITIVE TYPE
|
|
46
|
-
const app: IMetadataApplication = {
|
|
47
|
-
metadatas: metadatas.map((metadata) => metadata.toJSON()),
|
|
48
|
-
collection: collection.objects().map((obj) => obj.toJSON()),
|
|
49
|
-
};
|
|
50
|
-
return LiteralFactory.generate(p.tsc)(app);
|
|
51
|
-
};
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const NO_GENERIC_ARGUMENT = "Error on typia.metadata(): no generic argument.";
|
|
55
|
-
const GENERIC_ARGUMENT =
|
|
56
|
-
"Error on typia.metadata(): non-specified generic argument(s).";
|
|
1
|
+
import type ts from "typescript/lib/tsclibrary";
|
|
2
|
+
|
|
3
|
+
import { LiteralFactory } from "../../../factories/LiteralFactory";
|
|
4
|
+
import { MetadataCollection } from "../../../factories/MetadataCollection";
|
|
5
|
+
import { MetadataFactory } from "../../../factories/MetadataFactory";
|
|
6
|
+
|
|
7
|
+
import { IMetadataApplication } from "../../../metadata/IMetadataApplication";
|
|
8
|
+
import { Metadata } from "../../../metadata/Metadata";
|
|
9
|
+
|
|
10
|
+
import { TsTypeUtil } from "../../../utils/TsTypeUtil";
|
|
11
|
+
|
|
12
|
+
import { IProject } from "../../IProject";
|
|
13
|
+
|
|
14
|
+
export namespace MetadataTransformer {
|
|
15
|
+
export const transform =
|
|
16
|
+
(p: IProject) =>
|
|
17
|
+
(expression: ts.CallExpression): ts.Expression => {
|
|
18
|
+
if (!expression.typeArguments?.length)
|
|
19
|
+
throw new Error(NO_GENERIC_ARGUMENT);
|
|
20
|
+
|
|
21
|
+
// VALIDATE TUPLE ARGUMENTS
|
|
22
|
+
const top: ts.Node = expression.typeArguments[0]!;
|
|
23
|
+
if (!p.tsc.isTupleTypeNode(top)) return expression;
|
|
24
|
+
else if (top.elements.some((child) => !p.tsc.isTypeNode(child)))
|
|
25
|
+
return expression;
|
|
26
|
+
|
|
27
|
+
// GET TYPES
|
|
28
|
+
const typeList: ts.Type[] = top.elements.map((child) =>
|
|
29
|
+
p.checker.getTypeFromTypeNode(child as ts.TypeNode),
|
|
30
|
+
);
|
|
31
|
+
if (
|
|
32
|
+
typeList.some((type) => TsTypeUtil.isTypeParameter(p.tsc)(type))
|
|
33
|
+
)
|
|
34
|
+
throw new Error(GENERIC_ARGUMENT);
|
|
35
|
+
|
|
36
|
+
// METADATA
|
|
37
|
+
const collection: MetadataCollection = new MetadataCollection();
|
|
38
|
+
const metadatas: Array<Metadata> = typeList.map((type) =>
|
|
39
|
+
MetadataFactory.analyze(p)({
|
|
40
|
+
resolve: false,
|
|
41
|
+
constant: true,
|
|
42
|
+
})(collection)(type),
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
// CONVERT TO PRIMITIVE TYPE
|
|
46
|
+
const app: IMetadataApplication = {
|
|
47
|
+
metadatas: metadatas.map((metadata) => metadata.toJSON()),
|
|
48
|
+
collection: collection.objects().map((obj) => obj.toJSON()),
|
|
49
|
+
};
|
|
50
|
+
return LiteralFactory.generate(p.tsc)(app);
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const NO_GENERIC_ARGUMENT = "Error on typia.metadata(): no generic argument.";
|
|
55
|
+
const GENERIC_ARGUMENT =
|
|
56
|
+
"Error on typia.metadata(): non-specified generic argument(s).";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { PruneProgrammer } from "../../../programmers/PruneProgrammer";
|
|
2
|
-
|
|
3
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
-
|
|
5
|
-
export namespace PruneTransformer {
|
|
6
|
-
export const transform = GenericTransformer.scalar("prune")(
|
|
7
|
-
(project) => (modulo) => PruneProgrammer.write(project)(modulo),
|
|
8
|
-
);
|
|
9
|
-
}
|
|
1
|
+
import { PruneProgrammer } from "../../../programmers/PruneProgrammer";
|
|
2
|
+
|
|
3
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
+
|
|
5
|
+
export namespace PruneTransformer {
|
|
6
|
+
export const transform = GenericTransformer.scalar("prune")(
|
|
7
|
+
(project) => (modulo) => PruneProgrammer.write(project)(modulo),
|
|
8
|
+
);
|
|
9
|
+
}
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import type ts from "typescript/lib/tsclibrary";
|
|
2
|
-
|
|
3
|
-
import { RandomProgrammer } from "../../../programmers/RandomProgrammer";
|
|
4
|
-
|
|
5
|
-
import { TsNodeUtil } from "../../../utils/TsNodeUtil";
|
|
6
|
-
import { TsTypeUtil } from "../../../utils/TsTypeUtil";
|
|
7
|
-
|
|
8
|
-
import { IProject } from "../../IProject";
|
|
9
|
-
|
|
10
|
-
export namespace RandomTransformer {
|
|
11
|
-
export const transform =
|
|
12
|
-
(p: IProject) =>
|
|
13
|
-
(modulo: ts.LeftHandSideExpression) =>
|
|
14
|
-
(expression: ts.CallExpression): ts.Expression => {
|
|
15
|
-
// CHECK GENERIC ARGUMENT EXISTENCE
|
|
16
|
-
if (!expression.typeArguments?.[0]) throw new Error(NOT_SPECIFIED);
|
|
17
|
-
|
|
18
|
-
// GET TYPE INFO
|
|
19
|
-
const node: ts.TypeNode = expression.typeArguments[0];
|
|
20
|
-
const type: ts.Type = p.checker.getTypeFromTypeNode(node);
|
|
21
|
-
|
|
22
|
-
if (TsTypeUtil.isTypeParameter(p.tsc)(type))
|
|
23
|
-
throw new Error(NO_GENERIC_ARGUMENT);
|
|
24
|
-
|
|
25
|
-
// DO TRANSFORM
|
|
26
|
-
return p.tsc.factory.createCallExpression(
|
|
27
|
-
RandomProgrammer.write({
|
|
28
|
-
...p,
|
|
29
|
-
options: {
|
|
30
|
-
...p.options,
|
|
31
|
-
functional: false,
|
|
32
|
-
numeric: false,
|
|
33
|
-
},
|
|
34
|
-
})(modulo)()(type, TsNodeUtil.getFullText(p.tsc)(node).trim()),
|
|
35
|
-
undefined,
|
|
36
|
-
expression.arguments.length
|
|
37
|
-
? [expression.arguments[0]!]
|
|
38
|
-
: undefined,
|
|
39
|
-
);
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const NOT_SPECIFIED =
|
|
44
|
-
"Error on typia.random(): generic argument is not specified.";
|
|
45
|
-
const NO_GENERIC_ARGUMENT =
|
|
46
|
-
"Error on typia.random(): non-specified generic argument.";
|
|
1
|
+
import type ts from "typescript/lib/tsclibrary";
|
|
2
|
+
|
|
3
|
+
import { RandomProgrammer } from "../../../programmers/RandomProgrammer";
|
|
4
|
+
|
|
5
|
+
import { TsNodeUtil } from "../../../utils/TsNodeUtil";
|
|
6
|
+
import { TsTypeUtil } from "../../../utils/TsTypeUtil";
|
|
7
|
+
|
|
8
|
+
import { IProject } from "../../IProject";
|
|
9
|
+
|
|
10
|
+
export namespace RandomTransformer {
|
|
11
|
+
export const transform =
|
|
12
|
+
(p: IProject) =>
|
|
13
|
+
(modulo: ts.LeftHandSideExpression) =>
|
|
14
|
+
(expression: ts.CallExpression): ts.Expression => {
|
|
15
|
+
// CHECK GENERIC ARGUMENT EXISTENCE
|
|
16
|
+
if (!expression.typeArguments?.[0]) throw new Error(NOT_SPECIFIED);
|
|
17
|
+
|
|
18
|
+
// GET TYPE INFO
|
|
19
|
+
const node: ts.TypeNode = expression.typeArguments[0];
|
|
20
|
+
const type: ts.Type = p.checker.getTypeFromTypeNode(node);
|
|
21
|
+
|
|
22
|
+
if (TsTypeUtil.isTypeParameter(p.tsc)(type))
|
|
23
|
+
throw new Error(NO_GENERIC_ARGUMENT);
|
|
24
|
+
|
|
25
|
+
// DO TRANSFORM
|
|
26
|
+
return p.tsc.factory.createCallExpression(
|
|
27
|
+
RandomProgrammer.write({
|
|
28
|
+
...p,
|
|
29
|
+
options: {
|
|
30
|
+
...p.options,
|
|
31
|
+
functional: false,
|
|
32
|
+
numeric: false,
|
|
33
|
+
},
|
|
34
|
+
})(modulo)()(type, TsNodeUtil.getFullText(p.tsc)(node).trim()),
|
|
35
|
+
undefined,
|
|
36
|
+
expression.arguments.length
|
|
37
|
+
? [expression.arguments[0]!]
|
|
38
|
+
: undefined,
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const NOT_SPECIFIED =
|
|
44
|
+
"Error on typia.random(): generic argument is not specified.";
|
|
45
|
+
const NO_GENERIC_ARGUMENT =
|
|
46
|
+
"Error on typia.random(): non-specified generic argument.";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ValidateCloneProgrammer } from "../../../programmers/ValidateCloneProgrammer";
|
|
2
|
-
|
|
3
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
-
|
|
5
|
-
export namespace ValidateCloneTransformer {
|
|
6
|
-
export const transform = GenericTransformer.scalar("validatClone")(
|
|
7
|
-
(project) => (modulo) => ValidateCloneProgrammer.write(project)(modulo),
|
|
8
|
-
);
|
|
9
|
-
}
|
|
1
|
+
import { ValidateCloneProgrammer } from "../../../programmers/ValidateCloneProgrammer";
|
|
2
|
+
|
|
3
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
+
|
|
5
|
+
export namespace ValidateCloneTransformer {
|
|
6
|
+
export const transform = GenericTransformer.scalar("validatClone")(
|
|
7
|
+
(project) => (modulo) => ValidateCloneProgrammer.write(project)(modulo),
|
|
8
|
+
);
|
|
9
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ValidatePruneProgrammer } from "../../../programmers/ValidatePruneProgrammer";
|
|
2
|
-
|
|
3
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
-
|
|
5
|
-
export namespace ValidatePruneTransformer {
|
|
6
|
-
export const transform = GenericTransformer.scalar("validatPrune")(
|
|
7
|
-
(project) => (modulo) => ValidatePruneProgrammer.write(project)(modulo),
|
|
8
|
-
);
|
|
9
|
-
}
|
|
1
|
+
import { ValidatePruneProgrammer } from "../../../programmers/ValidatePruneProgrammer";
|
|
2
|
+
|
|
3
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
+
|
|
5
|
+
export namespace ValidatePruneTransformer {
|
|
6
|
+
export const transform = GenericTransformer.scalar("validatPrune")(
|
|
7
|
+
(project) => (modulo) => ValidatePruneProgrammer.write(project)(modulo),
|
|
8
|
+
);
|
|
9
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { AssertParseProgrammer } from "../../../programmers/AssertParseProgrammer";
|
|
2
|
-
|
|
3
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
-
|
|
5
|
-
export namespace AssertParseTransformer {
|
|
6
|
-
export const transform = GenericTransformer.scalar("assertParse")(
|
|
7
|
-
(project) => (modulo) => AssertParseProgrammer.write(project)(modulo),
|
|
8
|
-
);
|
|
9
|
-
}
|
|
1
|
+
import { AssertParseProgrammer } from "../../../programmers/AssertParseProgrammer";
|
|
2
|
+
|
|
3
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
+
|
|
5
|
+
export namespace AssertParseTransformer {
|
|
6
|
+
export const transform = GenericTransformer.scalar("assertParse")(
|
|
7
|
+
(project) => (modulo) => AssertParseProgrammer.write(project)(modulo),
|
|
8
|
+
);
|
|
9
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { AssertParseProgrammer } from "../../../programmers/AssertParseProgrammer";
|
|
2
|
-
|
|
3
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
-
|
|
5
|
-
export namespace CreateAssertParseTransformer {
|
|
6
|
-
export const transform = GenericTransformer.factory("createAssertParse")(
|
|
7
|
-
(project) => (modulo) => AssertParseProgrammer.write(project)(modulo),
|
|
8
|
-
);
|
|
9
|
-
}
|
|
1
|
+
import { AssertParseProgrammer } from "../../../programmers/AssertParseProgrammer";
|
|
2
|
+
|
|
3
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
+
|
|
5
|
+
export namespace CreateAssertParseTransformer {
|
|
6
|
+
export const transform = GenericTransformer.factory("createAssertParse")(
|
|
7
|
+
(project) => (modulo) => AssertParseProgrammer.write(project)(modulo),
|
|
8
|
+
);
|
|
9
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IsParseProgrammer } from "../../../programmers/IsParseProgrammer";
|
|
2
|
-
|
|
3
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
-
|
|
5
|
-
export namespace CreateIsParseTransformer {
|
|
6
|
-
export const transform = GenericTransformer.factory("createIsParse")(
|
|
7
|
-
(project) => (modulo) => IsParseProgrammer.write(project)(modulo),
|
|
8
|
-
);
|
|
9
|
-
}
|
|
1
|
+
import { IsParseProgrammer } from "../../../programmers/IsParseProgrammer";
|
|
2
|
+
|
|
3
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
+
|
|
5
|
+
export namespace CreateIsParseTransformer {
|
|
6
|
+
export const transform = GenericTransformer.factory("createIsParse")(
|
|
7
|
+
(project) => (modulo) => IsParseProgrammer.write(project)(modulo),
|
|
8
|
+
);
|
|
9
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ValidateParseProgrammer } from "../../../programmers/ValidateParseProgrammer";
|
|
2
|
-
|
|
3
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
-
|
|
5
|
-
export namespace CreateValidateParseTransformer {
|
|
6
|
-
export const transform = GenericTransformer.factory("createValidateParse")(
|
|
7
|
-
(project) => (modulo) => ValidateParseProgrammer.write(project)(modulo),
|
|
8
|
-
);
|
|
9
|
-
}
|
|
1
|
+
import { ValidateParseProgrammer } from "../../../programmers/ValidateParseProgrammer";
|
|
2
|
+
|
|
3
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
+
|
|
5
|
+
export namespace CreateValidateParseTransformer {
|
|
6
|
+
export const transform = GenericTransformer.factory("createValidateParse")(
|
|
7
|
+
(project) => (modulo) => ValidateParseProgrammer.write(project)(modulo),
|
|
8
|
+
);
|
|
9
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { IsParseProgrammer } from "../../../programmers/IsParseProgrammer";
|
|
2
|
-
|
|
3
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
-
|
|
5
|
-
export namespace IsParseTransformer {
|
|
6
|
-
export const transform = GenericTransformer.scalar("isParse")(
|
|
7
|
-
(project) => (modulo) => IsParseProgrammer.write(project)(modulo),
|
|
8
|
-
);
|
|
9
|
-
}
|
|
1
|
+
import { IsParseProgrammer } from "../../../programmers/IsParseProgrammer";
|
|
2
|
+
|
|
3
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
+
|
|
5
|
+
export namespace IsParseTransformer {
|
|
6
|
+
export const transform = GenericTransformer.scalar("isParse")(
|
|
7
|
+
(project) => (modulo) => IsParseProgrammer.write(project)(modulo),
|
|
8
|
+
);
|
|
9
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ValidateParseProgrammer } from "../../../programmers/ValidateParseProgrammer";
|
|
2
|
-
|
|
3
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
-
|
|
5
|
-
export namespace ValidateParseTransformer {
|
|
6
|
-
export const transform = GenericTransformer.scalar("validatParse")(
|
|
7
|
-
(project) => (modulo) => ValidateParseProgrammer.write(project)(modulo),
|
|
8
|
-
);
|
|
9
|
-
}
|
|
1
|
+
import { ValidateParseProgrammer } from "../../../programmers/ValidateParseProgrammer";
|
|
2
|
+
|
|
3
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
+
|
|
5
|
+
export namespace ValidateParseTransformer {
|
|
6
|
+
export const transform = GenericTransformer.scalar("validatParse")(
|
|
7
|
+
(project) => (modulo) => ValidateParseProgrammer.write(project)(modulo),
|
|
8
|
+
);
|
|
9
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { AssertStringifyProgrammer } from "../../../programmers/AssertStringifyProgrammer";
|
|
2
|
-
|
|
3
|
-
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
-
|
|
5
|
-
export namespace AssertStringifyTransformer {
|
|
6
|
-
export const transform = GenericTransformer.scalar("assertStringify")(
|
|
7
|
-
(project) => (modulo) =>
|
|
8
|
-
AssertStringifyProgrammer.write(project)(modulo),
|
|
9
|
-
);
|
|
10
|
-
}
|
|
1
|
+
import { AssertStringifyProgrammer } from "../../../programmers/AssertStringifyProgrammer";
|
|
2
|
+
|
|
3
|
+
import { GenericTransformer } from "../../internal/GenericTransformer";
|
|
4
|
+
|
|
5
|
+
export namespace AssertStringifyTransformer {
|
|
6
|
+
export const transform = GenericTransformer.scalar("assertStringify")(
|
|
7
|
+
(project) => (modulo) =>
|
|
8
|
+
AssertStringifyProgrammer.write(project)(modulo),
|
|
9
|
+
);
|
|
10
|
+
}
|