typia 3.6.2 → 3.6.4

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 (73) hide show
  1. package/README.md +2 -1
  2. package/lib/factories/internal/metadata/emplace_metadata_object.js +8 -7
  3. package/lib/factories/internal/metadata/emplace_metadata_object.js.map +1 -1
  4. package/lib/functional/$is_uuid.js +1 -1
  5. package/lib/functional/$is_uuid.js.map +1 -1
  6. package/lib/module.d.ts +2 -2
  7. package/package.json +1 -1
  8. package/src/executable/setup/ArgumentParser.ts +91 -91
  9. package/src/executable/setup/FileRetriever.ts +33 -33
  10. package/src/executable/setup/PackageManager.ts +92 -92
  11. package/src/executable/setup/PluginConfigurator.ts +99 -99
  12. package/src/factories/internal/metadata/emplace_metadata_object.ts +142 -140
  13. package/src/functional/$is_uuid.ts +1 -2
  14. package/src/module.ts +1946 -1946
  15. package/src/programmers/AssertCloneProgrammer.ts +70 -70
  16. package/src/programmers/AssertParseProgrammer.ts +65 -65
  17. package/src/programmers/AssertProgrammer.ts +232 -232
  18. package/src/programmers/AssertPruneProgrammer.ts +67 -67
  19. package/src/programmers/AssertStringifyProgrammer.ts +71 -71
  20. package/src/programmers/CheckerProgrammer.ts +893 -893
  21. package/src/programmers/CloneProgrammer.ts +386 -386
  22. package/src/programmers/FeatureProgrammer.ts +505 -505
  23. package/src/programmers/IsCloneProgrammer.ts +80 -80
  24. package/src/programmers/IsParseProgrammer.ts +74 -74
  25. package/src/programmers/IsPruneProgrammer.ts +75 -75
  26. package/src/programmers/IsStringifyProgrammer.ts +81 -81
  27. package/src/programmers/PruneProgrammer.ts +341 -341
  28. package/src/programmers/RandomProgrammer.ts +391 -391
  29. package/src/programmers/StringifyProgrammer.ts +795 -795
  30. package/src/programmers/ValidateCloneProgrammer.ts +90 -90
  31. package/src/programmers/ValidateParseProgrammer.ts +69 -69
  32. package/src/programmers/ValidateProgrammer.ts +266 -266
  33. package/src/programmers/ValidatePruneProgrammer.ts +83 -83
  34. package/src/programmers/ValidateStringifyProgrammer.ts +89 -89
  35. package/src/transformers/features/miscellaneous/AssertCloneTransformer.ts +9 -9
  36. package/src/transformers/features/miscellaneous/AssertPruneTransformer.ts +9 -9
  37. package/src/transformers/features/miscellaneous/CloneTransformer.ts +9 -9
  38. package/src/transformers/features/miscellaneous/CreateAssertCloneTransformer.ts +9 -9
  39. package/src/transformers/features/miscellaneous/CreateAssertPruneTransformer.ts +9 -9
  40. package/src/transformers/features/miscellaneous/CreateCloneTransformer.ts +9 -9
  41. package/src/transformers/features/miscellaneous/CreateIsCloneTransformer.ts +9 -9
  42. package/src/transformers/features/miscellaneous/CreateIsPruneTransformer.ts +9 -9
  43. package/src/transformers/features/miscellaneous/CreatePruneTransformer.ts +9 -9
  44. package/src/transformers/features/miscellaneous/CreateRandomGenerator.ts +42 -42
  45. package/src/transformers/features/miscellaneous/CreateValidateCloneTransformer.ts +9 -9
  46. package/src/transformers/features/miscellaneous/CreateValidatePruneTransformer.ts +9 -9
  47. package/src/transformers/features/miscellaneous/IsCloneTransformer.ts +9 -9
  48. package/src/transformers/features/miscellaneous/IsPruneTransformer.ts +9 -9
  49. package/src/transformers/features/miscellaneous/PruneTransformer.ts +9 -9
  50. package/src/transformers/features/miscellaneous/RandomTransformer.ts +48 -48
  51. package/src/transformers/features/miscellaneous/ValidateCloneTransformer.ts +9 -9
  52. package/src/transformers/features/miscellaneous/ValidatePruneTransformer.ts +9 -9
  53. package/src/transformers/features/parsers/AssertParseTransformer.ts +9 -9
  54. package/src/transformers/features/parsers/CreateAssertParseTransformer.ts +9 -9
  55. package/src/transformers/features/parsers/CreateIsParseTransformer.ts +9 -9
  56. package/src/transformers/features/parsers/CreateValidateParseTransformer.ts +9 -9
  57. package/src/transformers/features/parsers/IsParseTransformer.ts +9 -9
  58. package/src/transformers/features/parsers/ValidateParseTransformer.ts +9 -9
  59. package/src/transformers/features/stringifiers/AssertStringifyTransformer.ts +10 -10
  60. package/src/transformers/features/stringifiers/CreateAssertStringifyTransformer.ts +9 -9
  61. package/src/transformers/features/stringifiers/CreateIsStringifyTransformer.ts +9 -9
  62. package/src/transformers/features/stringifiers/CreateStringifyTransformer.ts +9 -9
  63. package/src/transformers/features/stringifiers/CreateValidateStringifyProgrammer.ts +11 -11
  64. package/src/transformers/features/stringifiers/IsStringifyTransformer.ts +9 -9
  65. package/src/transformers/features/stringifiers/StringifyTransformer.ts +9 -9
  66. package/src/transformers/features/stringifiers/ValidateStringifyTransformer.ts +10 -10
  67. package/src/transformers/features/validators/AssertTransformer.ts +11 -11
  68. package/src/transformers/features/validators/CreateAssertTransformer.ts +12 -12
  69. package/src/transformers/features/validators/CreateIsTransformer.ts +10 -10
  70. package/src/transformers/features/validators/CreateValidateTransformer.ts +12 -12
  71. package/src/transformers/features/validators/IsTransformer.ts +10 -10
  72. package/src/transformers/features/validators/ValidateTransformer.ts +11 -11
  73. package/src/transformers/internal/GenericTransformer.ts +99 -99
@@ -1,232 +1,232 @@
1
- import ts from "typescript";
2
-
3
- import { IdentifierFactory } from "../factories/IdentifierFactory";
4
- import { TypeFactory } from "../factories/TypeFactory";
5
-
6
- // import { StatementFactory } from "../factories/StatementFactory";
7
- import { IProject } from "../transformers/IProject";
8
-
9
- import { CheckerProgrammer } from "./CheckerProgrammer";
10
- import { IsProgrammer } from "./IsProgrammer";
11
- import { FunctionImporter } from "./helpers/FunctionImporeter";
12
- import { OptionPredicator } from "./helpers/OptionPredicator";
13
- import { check_object } from "./internal/check_object";
14
-
15
- export namespace AssertProgrammer {
16
- export const generate =
17
- (
18
- project: IProject,
19
- modulo: ts.LeftHandSideExpression,
20
- equals: boolean = false,
21
- ) =>
22
- (type: ts.Type, name?: string) => {
23
- const importer: FunctionImporter = new FunctionImporter();
24
- const program: ts.ArrowFunction = CheckerProgrammer.generate(
25
- project,
26
- {
27
- functors: "$ao",
28
- unioners: "$au",
29
- path: true,
30
- trace: true,
31
- numeric: OptionPredicator.numeric(project.options),
32
- equals,
33
- combiner: combiner(equals)(importer),
34
- joiner: joiner(equals)(importer),
35
- success: ts.factory.createTrue(),
36
- },
37
- importer,
38
- )(type, name);
39
-
40
- return ts.factory.createArrowFunction(
41
- undefined,
42
- undefined,
43
- [
44
- IdentifierFactory.parameter(
45
- "input",
46
- TypeFactory.keyword("any"),
47
- ),
48
- ],
49
- ts.factory.createTypeReferenceNode(
50
- name ?? TypeFactory.getFullName(project.checker, type),
51
- ),
52
- undefined,
53
- ts.factory.createBlock(
54
- [
55
- ...importer.declare(modulo),
56
- ts.factory.createExpressionStatement(
57
- ts.factory.createCallExpression(
58
- program,
59
- undefined,
60
- [
61
- ts.factory.createIdentifier("input"),
62
- ts.factory.createStringLiteral("$input"),
63
- ts.factory.createTrue(),
64
- ],
65
- ),
66
- ),
67
- ts.factory.createReturnStatement(
68
- ts.factory.createIdentifier(`input`),
69
- ),
70
- ],
71
- true,
72
- ),
73
- );
74
- };
75
-
76
- const combiner =
77
- (equals: boolean) =>
78
- (importer: FunctionImporter): CheckerProgrammer.IConfig.Combiner =>
79
- (explore: CheckerProgrammer.IExplore) => {
80
- if (explore.tracable === false)
81
- return IsProgrammer.CONFIG({
82
- object: assert_object(equals)(importer),
83
- numeric: true,
84
- })(importer).combiner(explore);
85
-
86
- const path: string = explore.postfix
87
- ? `_path + ${explore.postfix}`
88
- : "_path";
89
- return (logic) => (input, binaries, expected) =>
90
- logic === "and"
91
- ? binaries
92
- .map((binary) =>
93
- binary.combined
94
- ? binary.expression
95
- : ts.factory.createLogicalOr(
96
- binary.expression,
97
- create_guard_call(importer)(
98
- explore.source === "top"
99
- ? ts.factory.createTrue()
100
- : ts.factory.createIdentifier(
101
- "_exceptionable",
102
- ),
103
- )(
104
- ts.factory.createIdentifier(path),
105
- expected,
106
- input,
107
- ),
108
- ),
109
- )
110
- .reduce(ts.factory.createLogicalAnd)
111
- : (() => {
112
- const addicted = binaries.slice();
113
- if (
114
- addicted[addicted.length - 1]!.combined === false
115
- ) {
116
- addicted.push({
117
- combined: true,
118
- expression: create_guard_call(importer)(
119
- explore.source === "top"
120
- ? ts.factory.createTrue()
121
- : ts.factory.createIdentifier(
122
- "_exceptionable",
123
- ),
124
- )(
125
- ts.factory.createIdentifier(path),
126
- expected,
127
- input,
128
- ),
129
- });
130
- }
131
- return addicted
132
- .map((b) => b.expression)
133
- .reduce(ts.factory.createLogicalOr);
134
- })();
135
- };
136
-
137
- const assert_object = (equals: boolean) => (importer: FunctionImporter) =>
138
- check_object({
139
- equals,
140
- assert: true,
141
- undefined: true,
142
- reduce: ts.factory.createLogicalAnd,
143
- positive: ts.factory.createTrue(),
144
- superfluous: (value) =>
145
- create_guard_call(importer)()(
146
- ts.factory.createAdd(
147
- ts.factory.createIdentifier("_path"),
148
- ts.factory.createCallExpression(
149
- importer.use("join"),
150
- undefined,
151
- [ts.factory.createIdentifier("key")],
152
- ),
153
- ),
154
- "undefined",
155
- value,
156
- ),
157
- halt: (expr) =>
158
- ts.factory.createLogicalOr(
159
- ts.factory.createStrictEquality(
160
- ts.factory.createFalse(),
161
- ts.factory.createIdentifier("_exceptionable"),
162
- ),
163
- expr,
164
- ),
165
- })(importer);
166
-
167
- const joiner =
168
- (equals: boolean) =>
169
- (importer: FunctionImporter): CheckerProgrammer.IConfig.IJoiner => ({
170
- object: assert_object(equals)(importer),
171
- array: (input, arrow) =>
172
- ts.factory.createCallExpression(
173
- IdentifierFactory.join(input, "every"),
174
- undefined,
175
- [arrow],
176
- ),
177
- failure: (value, expected, explore) =>
178
- create_guard_call(importer)(
179
- explore?.from === "top"
180
- ? ts.factory.createTrue()
181
- : ts.factory.createIdentifier("_exceptionable"),
182
- )(
183
- ts.factory.createIdentifier(
184
- explore?.postfix
185
- ? `_path + ${explore.postfix}`
186
- : "_path",
187
- ),
188
- expected,
189
- value,
190
- ),
191
- full: equals
192
- ? undefined
193
- : (condition) => (input, expected, explore) =>
194
- ts.factory.createLogicalOr(
195
- condition,
196
- create_guard_call(importer)(
197
- explore.from === "top"
198
- ? ts.factory.createTrue()
199
- : ts.factory.createIdentifier(
200
- "_exceptionable",
201
- ),
202
- )(
203
- ts.factory.createIdentifier("_path"),
204
- expected,
205
- input,
206
- ),
207
- ),
208
- });
209
-
210
- const create_guard_call =
211
- (importer: FunctionImporter) =>
212
- (exceptionable?: ts.Expression) =>
213
- (
214
- path: ts.Expression,
215
- expected: string,
216
- value: ts.Expression,
217
- ): ts.Expression =>
218
- ts.factory.createCallExpression(importer.use("guard"), undefined, [
219
- exceptionable ?? ts.factory.createIdentifier("_exceptionable"),
220
- ts.factory.createObjectLiteralExpression(
221
- [
222
- ts.factory.createPropertyAssignment("path", path),
223
- ts.factory.createPropertyAssignment(
224
- "expected",
225
- ts.factory.createStringLiteral(expected),
226
- ),
227
- ts.factory.createPropertyAssignment("value", value),
228
- ],
229
- true,
230
- ),
231
- ]);
232
- }
1
+ import ts from "typescript";
2
+
3
+ import { IdentifierFactory } from "../factories/IdentifierFactory";
4
+ import { TypeFactory } from "../factories/TypeFactory";
5
+
6
+ // import { StatementFactory } from "../factories/StatementFactory";
7
+ import { IProject } from "../transformers/IProject";
8
+
9
+ import { CheckerProgrammer } from "./CheckerProgrammer";
10
+ import { IsProgrammer } from "./IsProgrammer";
11
+ import { FunctionImporter } from "./helpers/FunctionImporeter";
12
+ import { OptionPredicator } from "./helpers/OptionPredicator";
13
+ import { check_object } from "./internal/check_object";
14
+
15
+ export namespace AssertProgrammer {
16
+ export const generate =
17
+ (
18
+ project: IProject,
19
+ modulo: ts.LeftHandSideExpression,
20
+ equals: boolean = false,
21
+ ) =>
22
+ (type: ts.Type, name?: string) => {
23
+ const importer: FunctionImporter = new FunctionImporter();
24
+ const program: ts.ArrowFunction = CheckerProgrammer.generate(
25
+ project,
26
+ {
27
+ functors: "$ao",
28
+ unioners: "$au",
29
+ path: true,
30
+ trace: true,
31
+ numeric: OptionPredicator.numeric(project.options),
32
+ equals,
33
+ combiner: combiner(equals)(importer),
34
+ joiner: joiner(equals)(importer),
35
+ success: ts.factory.createTrue(),
36
+ },
37
+ importer,
38
+ )(type, name);
39
+
40
+ return ts.factory.createArrowFunction(
41
+ undefined,
42
+ undefined,
43
+ [
44
+ IdentifierFactory.parameter(
45
+ "input",
46
+ TypeFactory.keyword("any"),
47
+ ),
48
+ ],
49
+ ts.factory.createTypeReferenceNode(
50
+ name ?? TypeFactory.getFullName(project.checker, type),
51
+ ),
52
+ undefined,
53
+ ts.factory.createBlock(
54
+ [
55
+ ...importer.declare(modulo),
56
+ ts.factory.createExpressionStatement(
57
+ ts.factory.createCallExpression(
58
+ program,
59
+ undefined,
60
+ [
61
+ ts.factory.createIdentifier("input"),
62
+ ts.factory.createStringLiteral("$input"),
63
+ ts.factory.createTrue(),
64
+ ],
65
+ ),
66
+ ),
67
+ ts.factory.createReturnStatement(
68
+ ts.factory.createIdentifier(`input`),
69
+ ),
70
+ ],
71
+ true,
72
+ ),
73
+ );
74
+ };
75
+
76
+ const combiner =
77
+ (equals: boolean) =>
78
+ (importer: FunctionImporter): CheckerProgrammer.IConfig.Combiner =>
79
+ (explore: CheckerProgrammer.IExplore) => {
80
+ if (explore.tracable === false)
81
+ return IsProgrammer.CONFIG({
82
+ object: assert_object(equals)(importer),
83
+ numeric: true,
84
+ })(importer).combiner(explore);
85
+
86
+ const path: string = explore.postfix
87
+ ? `_path + ${explore.postfix}`
88
+ : "_path";
89
+ return (logic) => (input, binaries, expected) =>
90
+ logic === "and"
91
+ ? binaries
92
+ .map((binary) =>
93
+ binary.combined
94
+ ? binary.expression
95
+ : ts.factory.createLogicalOr(
96
+ binary.expression,
97
+ create_guard_call(importer)(
98
+ explore.source === "top"
99
+ ? ts.factory.createTrue()
100
+ : ts.factory.createIdentifier(
101
+ "_exceptionable",
102
+ ),
103
+ )(
104
+ ts.factory.createIdentifier(path),
105
+ expected,
106
+ input,
107
+ ),
108
+ ),
109
+ )
110
+ .reduce(ts.factory.createLogicalAnd)
111
+ : (() => {
112
+ const addicted = binaries.slice();
113
+ if (
114
+ addicted[addicted.length - 1]!.combined === false
115
+ ) {
116
+ addicted.push({
117
+ combined: true,
118
+ expression: create_guard_call(importer)(
119
+ explore.source === "top"
120
+ ? ts.factory.createTrue()
121
+ : ts.factory.createIdentifier(
122
+ "_exceptionable",
123
+ ),
124
+ )(
125
+ ts.factory.createIdentifier(path),
126
+ expected,
127
+ input,
128
+ ),
129
+ });
130
+ }
131
+ return addicted
132
+ .map((b) => b.expression)
133
+ .reduce(ts.factory.createLogicalOr);
134
+ })();
135
+ };
136
+
137
+ const assert_object = (equals: boolean) => (importer: FunctionImporter) =>
138
+ check_object({
139
+ equals,
140
+ assert: true,
141
+ undefined: true,
142
+ reduce: ts.factory.createLogicalAnd,
143
+ positive: ts.factory.createTrue(),
144
+ superfluous: (value) =>
145
+ create_guard_call(importer)()(
146
+ ts.factory.createAdd(
147
+ ts.factory.createIdentifier("_path"),
148
+ ts.factory.createCallExpression(
149
+ importer.use("join"),
150
+ undefined,
151
+ [ts.factory.createIdentifier("key")],
152
+ ),
153
+ ),
154
+ "undefined",
155
+ value,
156
+ ),
157
+ halt: (expr) =>
158
+ ts.factory.createLogicalOr(
159
+ ts.factory.createStrictEquality(
160
+ ts.factory.createFalse(),
161
+ ts.factory.createIdentifier("_exceptionable"),
162
+ ),
163
+ expr,
164
+ ),
165
+ })(importer);
166
+
167
+ const joiner =
168
+ (equals: boolean) =>
169
+ (importer: FunctionImporter): CheckerProgrammer.IConfig.IJoiner => ({
170
+ object: assert_object(equals)(importer),
171
+ array: (input, arrow) =>
172
+ ts.factory.createCallExpression(
173
+ IdentifierFactory.join(input, "every"),
174
+ undefined,
175
+ [arrow],
176
+ ),
177
+ failure: (value, expected, explore) =>
178
+ create_guard_call(importer)(
179
+ explore?.from === "top"
180
+ ? ts.factory.createTrue()
181
+ : ts.factory.createIdentifier("_exceptionable"),
182
+ )(
183
+ ts.factory.createIdentifier(
184
+ explore?.postfix
185
+ ? `_path + ${explore.postfix}`
186
+ : "_path",
187
+ ),
188
+ expected,
189
+ value,
190
+ ),
191
+ full: equals
192
+ ? undefined
193
+ : (condition) => (input, expected, explore) =>
194
+ ts.factory.createLogicalOr(
195
+ condition,
196
+ create_guard_call(importer)(
197
+ explore.from === "top"
198
+ ? ts.factory.createTrue()
199
+ : ts.factory.createIdentifier(
200
+ "_exceptionable",
201
+ ),
202
+ )(
203
+ ts.factory.createIdentifier("_path"),
204
+ expected,
205
+ input,
206
+ ),
207
+ ),
208
+ });
209
+
210
+ const create_guard_call =
211
+ (importer: FunctionImporter) =>
212
+ (exceptionable?: ts.Expression) =>
213
+ (
214
+ path: ts.Expression,
215
+ expected: string,
216
+ value: ts.Expression,
217
+ ): ts.Expression =>
218
+ ts.factory.createCallExpression(importer.use("guard"), undefined, [
219
+ exceptionable ?? ts.factory.createIdentifier("_exceptionable"),
220
+ ts.factory.createObjectLiteralExpression(
221
+ [
222
+ ts.factory.createPropertyAssignment("path", path),
223
+ ts.factory.createPropertyAssignment(
224
+ "expected",
225
+ ts.factory.createStringLiteral(expected),
226
+ ),
227
+ ts.factory.createPropertyAssignment("value", value),
228
+ ],
229
+ true,
230
+ ),
231
+ ]);
232
+ }
@@ -1,67 +1,67 @@
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 generate =
14
- (project: IProject, modulo: ts.LeftHandSideExpression) =>
15
- (type: ts.Type, name?: string) =>
16
- ts.factory.createArrowFunction(
17
- undefined,
18
- undefined,
19
- [
20
- IdentifierFactory.parameter(
21
- "input",
22
- TypeFactory.keyword("any"),
23
- ),
24
- ],
25
- ts.factory.createTypeReferenceNode(
26
- name ?? TypeFactory.getFullName(project.checker, type),
27
- ),
28
- undefined,
29
- ts.factory.createBlock([
30
- StatementFactory.constant(
31
- "assert",
32
- AssertProgrammer.generate(project, modulo)(type, name),
33
- ),
34
- StatementFactory.constant(
35
- "prune",
36
- PruneProgrammer.generate(
37
- {
38
- ...project,
39
- options: {
40
- ...project.options,
41
- functional: false,
42
- numeric: false,
43
- },
44
- },
45
- modulo,
46
- )(type, name),
47
- ),
48
- ts.factory.createExpressionStatement(
49
- ts.factory.createCallExpression(
50
- ts.factory.createIdentifier("assert"),
51
- undefined,
52
- [ts.factory.createIdentifier("input")],
53
- ),
54
- ),
55
- ts.factory.createExpressionStatement(
56
- ts.factory.createCallExpression(
57
- ts.factory.createIdentifier("prune"),
58
- undefined,
59
- [ts.factory.createIdentifier("input")],
60
- ),
61
- ),
62
- ts.factory.createReturnStatement(
63
- ts.factory.createIdentifier("input"),
64
- ),
65
- ]),
66
- );
67
- }
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 generate =
14
+ (project: IProject, modulo: ts.LeftHandSideExpression) =>
15
+ (type: ts.Type, name?: string) =>
16
+ ts.factory.createArrowFunction(
17
+ undefined,
18
+ undefined,
19
+ [
20
+ IdentifierFactory.parameter(
21
+ "input",
22
+ TypeFactory.keyword("any"),
23
+ ),
24
+ ],
25
+ ts.factory.createTypeReferenceNode(
26
+ name ?? TypeFactory.getFullName(project.checker, type),
27
+ ),
28
+ undefined,
29
+ ts.factory.createBlock([
30
+ StatementFactory.constant(
31
+ "assert",
32
+ AssertProgrammer.generate(project, modulo)(type, name),
33
+ ),
34
+ StatementFactory.constant(
35
+ "prune",
36
+ PruneProgrammer.generate(
37
+ {
38
+ ...project,
39
+ options: {
40
+ ...project.options,
41
+ functional: false,
42
+ numeric: false,
43
+ },
44
+ },
45
+ modulo,
46
+ )(type, name),
47
+ ),
48
+ ts.factory.createExpressionStatement(
49
+ ts.factory.createCallExpression(
50
+ ts.factory.createIdentifier("assert"),
51
+ undefined,
52
+ [ts.factory.createIdentifier("input")],
53
+ ),
54
+ ),
55
+ ts.factory.createExpressionStatement(
56
+ ts.factory.createCallExpression(
57
+ ts.factory.createIdentifier("prune"),
58
+ undefined,
59
+ [ts.factory.createIdentifier("input")],
60
+ ),
61
+ ),
62
+ ts.factory.createReturnStatement(
63
+ ts.factory.createIdentifier("input"),
64
+ ),
65
+ ]),
66
+ );
67
+ }