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.
- package/lib/factories/internal/metadata/iterate_metadata_array.js +1 -1
- package/lib/factories/internal/metadata/iterate_metadata_array.js.map +1 -1
- package/lib/module.d.ts +2 -2
- package/package.json +3 -2
- package/src/factories/CommentFactory.ts +64 -64
- package/src/factories/IdentifierFactory.ts +59 -59
- package/src/factories/MetadataFactory.ts +30 -30
- package/src/factories/internal/metadata/iterate_metadata_array.ts +1 -2
- package/src/metadata/MetadataObject.ts +118 -118
- package/src/module.ts +2038 -2038
- package/src/programmers/ApplicationProgrammer.ts +47 -47
- package/src/programmers/AssertCloneProgrammer.ts +71 -71
- package/src/programmers/AssertParseProgrammer.ts +66 -66
- package/src/programmers/AssertProgrammer.ts +279 -279
- package/src/programmers/AssertPruneProgrammer.ts +68 -68
- package/src/programmers/AssertStringifyProgrammer.ts +66 -66
- package/src/programmers/CloneProgrammer.ts +587 -587
- package/src/programmers/IsCloneProgrammer.ts +78 -78
- package/src/programmers/IsParseProgrammer.ts +72 -72
- package/src/programmers/IsProgrammer.ts +239 -239
- package/src/programmers/IsPruneProgrammer.ts +73 -73
- package/src/programmers/IsStringifyProgrammer.ts +76 -76
- package/src/programmers/LiteralsProgrammer.ts +60 -60
- package/src/programmers/PruneProgrammer.ts +542 -542
- package/src/programmers/RandomProgrammer.ts +581 -581
- package/src/programmers/StringifyProgrammer.ts +978 -978
- package/src/programmers/ValidateCloneProgrammer.ts +85 -85
- package/src/programmers/ValidateParseProgrammer.ts +70 -70
- package/src/programmers/ValidateProgrammer.ts +305 -305
- package/src/programmers/ValidatePruneProgrammer.ts +78 -78
- package/src/programmers/ValidateStringifyProgrammer.ts +84 -84
- package/src/programmers/internal/application_tuple.ts +57 -57
- package/src/programmers/internal/feature_object_entries.ts +63 -63
- package/src/schemas/IJsonSchema.ts +133 -133
|
@@ -1,133 +1,133 @@
|
|
|
1
|
-
import { IJsDocTagInfo } from "../metadata/IJsDocTagInfo";
|
|
2
|
-
import { IMetadataTag } from "../metadata/IMetadataTag";
|
|
3
|
-
|
|
4
|
-
import { Atomic } from "../typings/Atomic";
|
|
5
|
-
|
|
6
|
-
export type IJsonSchema = IJsonSchema.Known | IJsonSchema.IUnknown;
|
|
7
|
-
export namespace IJsonSchema {
|
|
8
|
-
export type Known =
|
|
9
|
-
| IEnumeration<"boolean">
|
|
10
|
-
| IEnumeration<"number">
|
|
11
|
-
| IEnumeration<"string">
|
|
12
|
-
| IBoolean
|
|
13
|
-
| IInteger
|
|
14
|
-
| INumber
|
|
15
|
-
| IString
|
|
16
|
-
| IArray
|
|
17
|
-
| ITuple
|
|
18
|
-
| IOneOf
|
|
19
|
-
| IReference
|
|
20
|
-
| INullOnly;
|
|
21
|
-
|
|
22
|
-
export interface IUnknown extends IAttribute {
|
|
23
|
-
type?: undefined;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
/* -----------------------------------------------------------
|
|
27
|
-
ATOMICS
|
|
28
|
-
----------------------------------------------------------- */
|
|
29
|
-
export interface IEnumeration<
|
|
30
|
-
Literal extends Exclude<Atomic.Literal, "bigint">,
|
|
31
|
-
> extends IAtomic<Literal> {
|
|
32
|
-
enum: Array<Atomic.Mapper[Literal]>;
|
|
33
|
-
}
|
|
34
|
-
export interface IAtomic<Literal extends Exclude<Atomic.Literal, "bigint">>
|
|
35
|
-
extends ISignificant<Literal> {
|
|
36
|
-
default?: Atomic.Mapper[Literal];
|
|
37
|
-
}
|
|
38
|
-
export interface IString extends IAtomic<"string"> {
|
|
39
|
-
/**
|
|
40
|
-
* @type uint
|
|
41
|
-
*/
|
|
42
|
-
minLength?: number;
|
|
43
|
-
/**
|
|
44
|
-
* @type uint
|
|
45
|
-
*/
|
|
46
|
-
maxLength?: number;
|
|
47
|
-
pattern?: string;
|
|
48
|
-
format?: string;
|
|
49
|
-
}
|
|
50
|
-
export interface INumber extends IAtomic<"number"> {
|
|
51
|
-
minimum?: number;
|
|
52
|
-
maximum?: number;
|
|
53
|
-
exclusiveMinimum?: boolean;
|
|
54
|
-
exclusiveMaximum?: boolean;
|
|
55
|
-
multipleOf?: number;
|
|
56
|
-
}
|
|
57
|
-
export interface IInteger extends IAtomic<"integer"> {
|
|
58
|
-
/**
|
|
59
|
-
* @type int
|
|
60
|
-
*/
|
|
61
|
-
minimum?: number;
|
|
62
|
-
/**
|
|
63
|
-
* @type int
|
|
64
|
-
*/
|
|
65
|
-
maximum?: number;
|
|
66
|
-
exclusiveMinimum?: boolean;
|
|
67
|
-
exclusiveMaximum?: boolean;
|
|
68
|
-
/**
|
|
69
|
-
* @type int
|
|
70
|
-
*/
|
|
71
|
-
multipleOf?: number;
|
|
72
|
-
}
|
|
73
|
-
export interface IBoolean extends IAtomic<"boolean"> {}
|
|
74
|
-
|
|
75
|
-
/* -----------------------------------------------------------
|
|
76
|
-
OBJECTS
|
|
77
|
-
----------------------------------------------------------- */
|
|
78
|
-
export interface IArray extends ISignificant<"array"> {
|
|
79
|
-
items: IJsonSchema;
|
|
80
|
-
/**
|
|
81
|
-
* @type uint
|
|
82
|
-
*/
|
|
83
|
-
minItems?: number;
|
|
84
|
-
/**
|
|
85
|
-
* @type uint
|
|
86
|
-
*/
|
|
87
|
-
maxItems?: number;
|
|
88
|
-
"x-typia-tuple"?: ITuple;
|
|
89
|
-
}
|
|
90
|
-
export interface ITuple extends ISignificant<"array"> {
|
|
91
|
-
items: IJsonSchema[];
|
|
92
|
-
/**
|
|
93
|
-
* @type uint
|
|
94
|
-
*/
|
|
95
|
-
minItems: number;
|
|
96
|
-
/**
|
|
97
|
-
* @type uint
|
|
98
|
-
*/
|
|
99
|
-
maxItems?: number;
|
|
100
|
-
}
|
|
101
|
-
export interface IReference extends IAttribute {
|
|
102
|
-
$ref: string;
|
|
103
|
-
}
|
|
104
|
-
export interface INullOnly extends IAttribute {
|
|
105
|
-
type: "null";
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/* -----------------------------------------------------------
|
|
109
|
-
MISCELLANEOUS
|
|
110
|
-
----------------------------------------------------------- */
|
|
111
|
-
export interface IOneOf extends IAttribute {
|
|
112
|
-
oneOf: IJsonSchema[];
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
export interface ISignificant<Literal extends string> extends IAttribute {
|
|
116
|
-
type: Literal;
|
|
117
|
-
|
|
118
|
-
/**
|
|
119
|
-
* Only when swagger mode.
|
|
120
|
-
*/
|
|
121
|
-
nullable?: boolean;
|
|
122
|
-
}
|
|
123
|
-
export interface IAttribute {
|
|
124
|
-
deprecated?: boolean;
|
|
125
|
-
title?: string;
|
|
126
|
-
description?: string;
|
|
127
|
-
"x-typia-metaTags"?: IMetadataTag[];
|
|
128
|
-
"x-typia-jsDocTags"?: IJsDocTagInfo[];
|
|
129
|
-
"x-typia-required"?: boolean;
|
|
130
|
-
"x-typia-optional"?: boolean;
|
|
131
|
-
"x-typia-rest"?: boolean;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
1
|
+
import { IJsDocTagInfo } from "../metadata/IJsDocTagInfo";
|
|
2
|
+
import { IMetadataTag } from "../metadata/IMetadataTag";
|
|
3
|
+
|
|
4
|
+
import { Atomic } from "../typings/Atomic";
|
|
5
|
+
|
|
6
|
+
export type IJsonSchema = IJsonSchema.Known | IJsonSchema.IUnknown;
|
|
7
|
+
export namespace IJsonSchema {
|
|
8
|
+
export type Known =
|
|
9
|
+
| IEnumeration<"boolean">
|
|
10
|
+
| IEnumeration<"number">
|
|
11
|
+
| IEnumeration<"string">
|
|
12
|
+
| IBoolean
|
|
13
|
+
| IInteger
|
|
14
|
+
| INumber
|
|
15
|
+
| IString
|
|
16
|
+
| IArray
|
|
17
|
+
| ITuple
|
|
18
|
+
| IOneOf
|
|
19
|
+
| IReference
|
|
20
|
+
| INullOnly;
|
|
21
|
+
|
|
22
|
+
export interface IUnknown extends IAttribute {
|
|
23
|
+
type?: undefined;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* -----------------------------------------------------------
|
|
27
|
+
ATOMICS
|
|
28
|
+
----------------------------------------------------------- */
|
|
29
|
+
export interface IEnumeration<
|
|
30
|
+
Literal extends Exclude<Atomic.Literal, "bigint">,
|
|
31
|
+
> extends IAtomic<Literal> {
|
|
32
|
+
enum: Array<Atomic.Mapper[Literal]>;
|
|
33
|
+
}
|
|
34
|
+
export interface IAtomic<Literal extends Exclude<Atomic.Literal, "bigint">>
|
|
35
|
+
extends ISignificant<Literal> {
|
|
36
|
+
default?: Atomic.Mapper[Literal];
|
|
37
|
+
}
|
|
38
|
+
export interface IString extends IAtomic<"string"> {
|
|
39
|
+
/**
|
|
40
|
+
* @type uint
|
|
41
|
+
*/
|
|
42
|
+
minLength?: number;
|
|
43
|
+
/**
|
|
44
|
+
* @type uint
|
|
45
|
+
*/
|
|
46
|
+
maxLength?: number;
|
|
47
|
+
pattern?: string;
|
|
48
|
+
format?: string;
|
|
49
|
+
}
|
|
50
|
+
export interface INumber extends IAtomic<"number"> {
|
|
51
|
+
minimum?: number;
|
|
52
|
+
maximum?: number;
|
|
53
|
+
exclusiveMinimum?: boolean;
|
|
54
|
+
exclusiveMaximum?: boolean;
|
|
55
|
+
multipleOf?: number;
|
|
56
|
+
}
|
|
57
|
+
export interface IInteger extends IAtomic<"integer"> {
|
|
58
|
+
/**
|
|
59
|
+
* @type int
|
|
60
|
+
*/
|
|
61
|
+
minimum?: number;
|
|
62
|
+
/**
|
|
63
|
+
* @type int
|
|
64
|
+
*/
|
|
65
|
+
maximum?: number;
|
|
66
|
+
exclusiveMinimum?: boolean;
|
|
67
|
+
exclusiveMaximum?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* @type int
|
|
70
|
+
*/
|
|
71
|
+
multipleOf?: number;
|
|
72
|
+
}
|
|
73
|
+
export interface IBoolean extends IAtomic<"boolean"> {}
|
|
74
|
+
|
|
75
|
+
/* -----------------------------------------------------------
|
|
76
|
+
OBJECTS
|
|
77
|
+
----------------------------------------------------------- */
|
|
78
|
+
export interface IArray extends ISignificant<"array"> {
|
|
79
|
+
items: IJsonSchema;
|
|
80
|
+
/**
|
|
81
|
+
* @type uint
|
|
82
|
+
*/
|
|
83
|
+
minItems?: number;
|
|
84
|
+
/**
|
|
85
|
+
* @type uint
|
|
86
|
+
*/
|
|
87
|
+
maxItems?: number;
|
|
88
|
+
"x-typia-tuple"?: ITuple;
|
|
89
|
+
}
|
|
90
|
+
export interface ITuple extends ISignificant<"array"> {
|
|
91
|
+
items: IJsonSchema[];
|
|
92
|
+
/**
|
|
93
|
+
* @type uint
|
|
94
|
+
*/
|
|
95
|
+
minItems: number;
|
|
96
|
+
/**
|
|
97
|
+
* @type uint
|
|
98
|
+
*/
|
|
99
|
+
maxItems?: number;
|
|
100
|
+
}
|
|
101
|
+
export interface IReference extends IAttribute {
|
|
102
|
+
$ref: string;
|
|
103
|
+
}
|
|
104
|
+
export interface INullOnly extends IAttribute {
|
|
105
|
+
type: "null";
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/* -----------------------------------------------------------
|
|
109
|
+
MISCELLANEOUS
|
|
110
|
+
----------------------------------------------------------- */
|
|
111
|
+
export interface IOneOf extends IAttribute {
|
|
112
|
+
oneOf: IJsonSchema[];
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export interface ISignificant<Literal extends string> extends IAttribute {
|
|
116
|
+
type: Literal;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Only when swagger mode.
|
|
120
|
+
*/
|
|
121
|
+
nullable?: boolean;
|
|
122
|
+
}
|
|
123
|
+
export interface IAttribute {
|
|
124
|
+
deprecated?: boolean;
|
|
125
|
+
title?: string;
|
|
126
|
+
description?: string;
|
|
127
|
+
"x-typia-metaTags"?: IMetadataTag[];
|
|
128
|
+
"x-typia-jsDocTags"?: IJsDocTagInfo[];
|
|
129
|
+
"x-typia-required"?: boolean;
|
|
130
|
+
"x-typia-optional"?: boolean;
|
|
131
|
+
"x-typia-rest"?: boolean;
|
|
132
|
+
}
|
|
133
|
+
}
|