typia 4.1.0 → 4.1.1-dev.20230621

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.
Files changed (34) hide show
  1. package/lib/factories/internal/metadata/iterate_metadata_array.js +1 -1
  2. package/lib/factories/internal/metadata/iterate_metadata_array.js.map +1 -1
  3. package/lib/module.d.ts +2 -2
  4. package/package.json +3 -2
  5. package/src/factories/CommentFactory.ts +64 -64
  6. package/src/factories/IdentifierFactory.ts +59 -59
  7. package/src/factories/MetadataFactory.ts +30 -30
  8. package/src/factories/internal/metadata/iterate_metadata_array.ts +1 -2
  9. package/src/metadata/MetadataObject.ts +118 -118
  10. package/src/module.ts +2038 -2038
  11. package/src/programmers/ApplicationProgrammer.ts +47 -47
  12. package/src/programmers/AssertCloneProgrammer.ts +71 -71
  13. package/src/programmers/AssertParseProgrammer.ts +66 -66
  14. package/src/programmers/AssertProgrammer.ts +279 -279
  15. package/src/programmers/AssertPruneProgrammer.ts +68 -68
  16. package/src/programmers/AssertStringifyProgrammer.ts +66 -66
  17. package/src/programmers/CloneProgrammer.ts +587 -587
  18. package/src/programmers/IsCloneProgrammer.ts +78 -78
  19. package/src/programmers/IsParseProgrammer.ts +72 -72
  20. package/src/programmers/IsProgrammer.ts +239 -239
  21. package/src/programmers/IsPruneProgrammer.ts +73 -73
  22. package/src/programmers/IsStringifyProgrammer.ts +76 -76
  23. package/src/programmers/LiteralsProgrammer.ts +60 -60
  24. package/src/programmers/PruneProgrammer.ts +542 -542
  25. package/src/programmers/RandomProgrammer.ts +581 -581
  26. package/src/programmers/StringifyProgrammer.ts +978 -978
  27. package/src/programmers/ValidateCloneProgrammer.ts +85 -85
  28. package/src/programmers/ValidateParseProgrammer.ts +70 -70
  29. package/src/programmers/ValidateProgrammer.ts +305 -305
  30. package/src/programmers/ValidatePruneProgrammer.ts +78 -78
  31. package/src/programmers/ValidateStringifyProgrammer.ts +84 -84
  32. package/src/programmers/internal/application_tuple.ts +57 -57
  33. package/src/programmers/internal/feature_object_entries.ts +63 -63
  34. package/src/schemas/IJsonSchema.ts +133 -133
@@ -1,68 +1,68 @@
1
- import ts from "typescript";
2
-
3
- import { IdentifierFactory } from "../factories/IdentifierFactory";
4
- import { StatementFactory } from "../factories/StatementFactory";
5
- import { TypeFactory } from "../factories/TypeFactory";
6
-
7
- import { IProject } from "../transformers/IProject";
8
-
9
- import { AssertProgrammer } from "./AssertProgrammer";
10
- import { PruneProgrammer } from "./PruneProgrammer";
11
-
12
- export namespace AssertPruneProgrammer {
13
- export const write =
14
- (project: IProject) =>
15
- (modulo: ts.LeftHandSideExpression) =>
16
- (type: ts.Type, name?: string) =>
17
- ts.factory.createArrowFunction(
18
- undefined,
19
- undefined,
20
- [
21
- IdentifierFactory.parameter(
22
- "input",
23
- TypeFactory.keyword("any"),
24
- ),
25
- ],
26
- ts.factory.createTypeReferenceNode(
27
- name ?? TypeFactory.getFullName(project.checker)(type),
28
- ),
29
- undefined,
30
- ts.factory.createBlock([
31
- StatementFactory.constant(
32
- "assert",
33
- AssertProgrammer.write(project)(modulo)(false)(
34
- type,
35
- name,
36
- ),
37
- ),
38
- StatementFactory.constant(
39
- "prune",
40
- PruneProgrammer.write({
41
- ...project,
42
- options: {
43
- ...project.options,
44
- functional: false,
45
- numeric: false,
46
- },
47
- })(modulo)(type, name),
48
- ),
49
- ts.factory.createExpressionStatement(
50
- ts.factory.createCallExpression(
51
- ts.factory.createIdentifier("assert"),
52
- undefined,
53
- [ts.factory.createIdentifier("input")],
54
- ),
55
- ),
56
- ts.factory.createExpressionStatement(
57
- ts.factory.createCallExpression(
58
- ts.factory.createIdentifier("prune"),
59
- undefined,
60
- [ts.factory.createIdentifier("input")],
61
- ),
62
- ),
63
- ts.factory.createReturnStatement(
64
- ts.factory.createIdentifier("input"),
65
- ),
66
- ]),
67
- );
68
- }
1
+ import ts from "typescript";
2
+
3
+ import { IdentifierFactory } from "../factories/IdentifierFactory";
4
+ import { StatementFactory } from "../factories/StatementFactory";
5
+ import { TypeFactory } from "../factories/TypeFactory";
6
+
7
+ import { IProject } from "../transformers/IProject";
8
+
9
+ import { AssertProgrammer } from "./AssertProgrammer";
10
+ import { PruneProgrammer } from "./PruneProgrammer";
11
+
12
+ export namespace AssertPruneProgrammer {
13
+ export const write =
14
+ (project: IProject) =>
15
+ (modulo: ts.LeftHandSideExpression) =>
16
+ (type: ts.Type, name?: string) =>
17
+ ts.factory.createArrowFunction(
18
+ undefined,
19
+ undefined,
20
+ [
21
+ IdentifierFactory.parameter(
22
+ "input",
23
+ TypeFactory.keyword("any"),
24
+ ),
25
+ ],
26
+ ts.factory.createTypeReferenceNode(
27
+ name ?? TypeFactory.getFullName(project.checker)(type),
28
+ ),
29
+ undefined,
30
+ ts.factory.createBlock([
31
+ StatementFactory.constant(
32
+ "assert",
33
+ AssertProgrammer.write(project)(modulo)(false)(
34
+ type,
35
+ name,
36
+ ),
37
+ ),
38
+ StatementFactory.constant(
39
+ "prune",
40
+ PruneProgrammer.write({
41
+ ...project,
42
+ options: {
43
+ ...project.options,
44
+ functional: false,
45
+ numeric: false,
46
+ },
47
+ })(modulo)(type, name),
48
+ ),
49
+ ts.factory.createExpressionStatement(
50
+ ts.factory.createCallExpression(
51
+ ts.factory.createIdentifier("assert"),
52
+ undefined,
53
+ [ts.factory.createIdentifier("input")],
54
+ ),
55
+ ),
56
+ ts.factory.createExpressionStatement(
57
+ ts.factory.createCallExpression(
58
+ ts.factory.createIdentifier("prune"),
59
+ undefined,
60
+ [ts.factory.createIdentifier("input")],
61
+ ),
62
+ ),
63
+ ts.factory.createReturnStatement(
64
+ ts.factory.createIdentifier("input"),
65
+ ),
66
+ ]),
67
+ );
68
+ }
@@ -1,66 +1,66 @@
1
- import ts from "typescript";
2
-
3
- import { IdentifierFactory } from "../factories/IdentifierFactory";
4
- import { StatementFactory } from "../factories/StatementFactory";
5
- import { TypeFactory } from "../factories/TypeFactory";
6
-
7
- import { IProject } from "../transformers/IProject";
8
-
9
- import { AssertProgrammer } from "./AssertProgrammer";
10
- import { StringifyProgrammer } from "./StringifyProgrammer";
11
-
12
- export namespace AssertStringifyProgrammer {
13
- export const write =
14
- (project: IProject) =>
15
- (modulo: ts.LeftHandSideExpression) =>
16
- (type: ts.Type, name?: string) =>
17
- ts.factory.createArrowFunction(
18
- undefined,
19
- undefined,
20
- [
21
- IdentifierFactory.parameter(
22
- "input",
23
- TypeFactory.keyword("any"),
24
- ),
25
- ],
26
- TypeFactory.keyword("string"),
27
- undefined,
28
- ts.factory.createBlock([
29
- StatementFactory.constant(
30
- "assert",
31
- AssertProgrammer.write({
32
- ...project,
33
- options: {
34
- ...project.options,
35
- functional: false,
36
- numeric: true,
37
- },
38
- })(modulo)(false)(type, name),
39
- ),
40
- StatementFactory.constant(
41
- "stringify",
42
- StringifyProgrammer.write({
43
- ...project,
44
- options: {
45
- ...project.options,
46
- functional: false,
47
- numeric: false,
48
- },
49
- })(modulo)(type, name),
50
- ),
51
- ts.factory.createReturnStatement(
52
- ts.factory.createCallExpression(
53
- ts.factory.createIdentifier("stringify"),
54
- undefined,
55
- [
56
- ts.factory.createCallExpression(
57
- ts.factory.createIdentifier("assert"),
58
- undefined,
59
- [ts.factory.createIdentifier("input")],
60
- ),
61
- ],
62
- ),
63
- ),
64
- ]),
65
- );
66
- }
1
+ import ts from "typescript";
2
+
3
+ import { IdentifierFactory } from "../factories/IdentifierFactory";
4
+ import { StatementFactory } from "../factories/StatementFactory";
5
+ import { TypeFactory } from "../factories/TypeFactory";
6
+
7
+ import { IProject } from "../transformers/IProject";
8
+
9
+ import { AssertProgrammer } from "./AssertProgrammer";
10
+ import { StringifyProgrammer } from "./StringifyProgrammer";
11
+
12
+ export namespace AssertStringifyProgrammer {
13
+ export const write =
14
+ (project: IProject) =>
15
+ (modulo: ts.LeftHandSideExpression) =>
16
+ (type: ts.Type, name?: string) =>
17
+ ts.factory.createArrowFunction(
18
+ undefined,
19
+ undefined,
20
+ [
21
+ IdentifierFactory.parameter(
22
+ "input",
23
+ TypeFactory.keyword("any"),
24
+ ),
25
+ ],
26
+ TypeFactory.keyword("string"),
27
+ undefined,
28
+ ts.factory.createBlock([
29
+ StatementFactory.constant(
30
+ "assert",
31
+ AssertProgrammer.write({
32
+ ...project,
33
+ options: {
34
+ ...project.options,
35
+ functional: false,
36
+ numeric: true,
37
+ },
38
+ })(modulo)(false)(type, name),
39
+ ),
40
+ StatementFactory.constant(
41
+ "stringify",
42
+ StringifyProgrammer.write({
43
+ ...project,
44
+ options: {
45
+ ...project.options,
46
+ functional: false,
47
+ numeric: false,
48
+ },
49
+ })(modulo)(type, name),
50
+ ),
51
+ ts.factory.createReturnStatement(
52
+ ts.factory.createCallExpression(
53
+ ts.factory.createIdentifier("stringify"),
54
+ undefined,
55
+ [
56
+ ts.factory.createCallExpression(
57
+ ts.factory.createIdentifier("assert"),
58
+ undefined,
59
+ [ts.factory.createIdentifier("input")],
60
+ ),
61
+ ],
62
+ ),
63
+ ),
64
+ ]),
65
+ );
66
+ }