typia 7.0.0-dev.20240922 → 7.0.0-dev.20240924
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/programmers/FeatureProgrammer.d.ts +2 -2
- package/lib/programmers/FeatureProgrammer.js +2 -2
- package/lib/programmers/json/JsonStringifyProgrammer.js +519 -494
- package/lib/programmers/json/JsonStringifyProgrammer.js.map +1 -1
- package/lib/programmers/misc/MiscCloneProgrammer.js +456 -405
- package/lib/programmers/misc/MiscCloneProgrammer.js.map +1 -1
- package/lib/programmers/misc/MiscLiteralsProgrammer.js +3 -3
- package/lib/programmers/misc/MiscLiteralsProgrammer.js.map +1 -1
- package/lib/programmers/misc/MiscPruneProgrammer.js +336 -300
- package/lib/programmers/misc/MiscPruneProgrammer.js.map +1 -1
- package/package.json +1 -1
- package/src/programmers/FeatureProgrammer.ts +3 -3
- package/src/programmers/json/JsonStringifyProgrammer.ts +787 -678
- package/src/programmers/misc/MiscCloneProgrammer.ts +737 -600
- package/src/programmers/misc/MiscLiteralsProgrammer.ts +4 -4
- package/src/programmers/misc/MiscPruneProgrammer.ts +508 -412
|
@@ -26,7 +26,7 @@ export declare namespace FeatureProgrammer {
|
|
|
26
26
|
/**
|
|
27
27
|
* Initializer of metadata.
|
|
28
28
|
*/
|
|
29
|
-
initializer: (
|
|
29
|
+
initializer: (context: ITypiaContext) => (importer: FunctionImporter) => (type: ts.Type) => [MetadataCollection, Metadata];
|
|
30
30
|
/**
|
|
31
31
|
* Decoder, station of every types.
|
|
32
32
|
*/
|
|
@@ -165,7 +165,7 @@ export declare namespace FeatureProgrammer {
|
|
|
165
165
|
importer: FunctionImporter;
|
|
166
166
|
result: IDecomposed;
|
|
167
167
|
}) => ts.CallExpression;
|
|
168
|
-
const write: (
|
|
168
|
+
const write: (context: ITypiaContext) => (config: IConfig) => (importer: FunctionImporter) => (type: ts.Type, name?: string) => ts.ArrowFunction;
|
|
169
169
|
const write_object_functions: (config: IConfig) => (importer: FunctionImporter) => (collection: MetadataCollection) => ts.VariableStatement[];
|
|
170
170
|
const write_union_functions: (config: IConfig) => (collection: MetadataCollection) => ts.VariableStatement[];
|
|
171
171
|
const decode_array: (config: Pick<IConfig, "trace" | "path" | "decoder" | "prefix">) => (importer: FunctionImporter) => (combiner: (props: {
|
|
@@ -84,12 +84,12 @@ var FeatureProgrammer;
|
|
|
84
84
|
typescript_1.default.factory.createReturnStatement(props.result.arrow),
|
|
85
85
|
], false))), undefined, undefined);
|
|
86
86
|
};
|
|
87
|
-
FeatureProgrammer.write = function (
|
|
87
|
+
FeatureProgrammer.write = function (context) {
|
|
88
88
|
return function (config) {
|
|
89
89
|
return function (importer) {
|
|
90
90
|
return function (type, name) {
|
|
91
91
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
92
|
-
var _h = __read(config.initializer(
|
|
92
|
+
var _h = __read(config.initializer(context)(importer)(type), 2), collection = _h[0], meta = _h[1];
|
|
93
93
|
// ITERATE OVER ALL METADATA
|
|
94
94
|
var output = config.decoder()(ValueFactory_1.ValueFactory.INPUT(), meta, {
|
|
95
95
|
tracable: config.path || config.trace,
|