@aitianyu.cn/types 0.0.11 → 0.0.13
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/dist/lib/index.js +54 -54
- package/dist/lib/types/AreaCode.js +269 -269
- package/dist/lib/types/Exception.js +19 -19
- package/dist/lib/types/Logs.js +20 -20
- package/dist/lib/types/Object.js +3 -3
- package/dist/lib/types/PathBase.js +109 -109
- package/dist/lib/types/Security.js +10 -10
- package/dist/lib/types/TMap.js +138 -138
- package/dist/lib/types/Types.js +3 -3
- package/dist/lib/types/index.js +17 -17
- package/dist/lib/utilities/coding/Error.js +44 -44
- package/dist/lib/utilities/coding/Path.js +198 -198
- package/dist/lib/utilities/coding/index.js +10 -10
- package/dist/lib/utilities/core/Errors.js +86 -86
- package/dist/lib/utilities/core/Language.js +559 -559
- package/dist/lib/utilities/core/Log.js +108 -108
- package/dist/lib/utilities/core/TypeConvertion.js +25 -25
- package/dist/lib/utilities/core/index.js +21 -21
- package/dist/lib/utilities/core/interface/ITJSON.js +3 -0
- package/dist/lib/utilities/core/interface/ITianyuType.js +3 -0
- package/dist/lib/utilities/core/object/ArrayHelper.js +35 -35
- package/dist/lib/utilities/core/object/Calculater.js +230 -230
- package/dist/lib/utilities/core/object/Helper.js +201 -201
- package/dist/lib/utilities/core/object/StringHelper.js +22 -22
- package/dist/lib/utilities/core/type/TArray.js +7 -0
- package/dist/lib/utilities/core/type/TBoolean.js +7 -0
- package/dist/lib/utilities/core/type/TJSON.js +7 -0
- package/dist/lib/utilities/core/type/TNumber.js +7 -0
- package/dist/lib/utilities/core/type/TObject.js +7 -0
- package/dist/lib/utilities/core/type/TString.js +7 -0
- package/dist/lib/utilities/security/Guid.js +20 -20
- package/dist/lib/utilities/security/Hash.js +15 -15
- package/dist/lib/utilities/security/index.js +8 -8
- package/dist/types/index.d.ts +21 -21
- package/dist/types/types/AreaCode.d.ts +135 -135
- package/dist/types/types/Exception.d.ts +11 -11
- package/dist/types/types/Logs.d.ts +64 -64
- package/dist/types/types/Object.d.ts +18 -18
- package/dist/types/types/PathBase.d.ts +76 -76
- package/dist/types/types/Security.d.ts +23 -23
- package/dist/types/types/TMap.d.ts +80 -80
- package/dist/types/types/Types.d.ts +25 -20
- package/dist/types/types/index.d.ts +9 -9
- package/dist/types/utilities/coding/Error.d.ts +27 -27
- package/dist/types/utilities/coding/Path.d.ts +61 -61
- package/dist/types/utilities/coding/index.d.ts +3 -3
- package/dist/types/utilities/core/Errors.d.ts +47 -47
- package/dist/types/utilities/core/Language.d.ts +17 -17
- package/dist/types/utilities/core/Log.d.ts +12 -12
- package/dist/types/utilities/core/TypeConvertion.d.ts +2 -2
- package/dist/types/utilities/core/index.d.ts +6 -6
- package/dist/types/utilities/core/interface/ITJSON.d.ts +5 -0
- package/dist/types/utilities/core/interface/ITianyuType.d.ts +5 -0
- package/dist/types/utilities/core/object/ArrayHelper.d.ts +11 -11
- package/dist/types/utilities/core/object/Calculater.d.ts +22 -22
- package/dist/types/utilities/core/object/Helper.d.ts +39 -39
- package/dist/types/utilities/core/object/StringHelper.d.ts +4 -4
- package/dist/types/utilities/core/type/TArray.d.ts +3 -0
- package/dist/types/utilities/core/type/TBoolean.d.ts +3 -0
- package/dist/types/utilities/core/type/TJSON.d.ts +3 -0
- package/dist/types/utilities/core/type/TNumber.d.ts +3 -0
- package/dist/types/utilities/core/type/TObject.d.ts +3 -0
- package/dist/types/utilities/core/type/TString.d.ts +3 -0
- package/dist/types/utilities/security/Guid.d.ts +3 -3
- package/dist/types/utilities/security/Hash.d.ts +3 -3
- package/dist/types/utilities/security/index.d.ts +3 -3
- package/package.json +51 -51
|
@@ -1,135 +1,135 @@
|
|
|
1
|
-
/**@format */
|
|
2
|
-
/** International Area name and its code */
|
|
3
|
-
export declare enum AreaCode {
|
|
4
|
-
unknown = 0,
|
|
5
|
-
af_ZA = 1078,
|
|
6
|
-
sq_AL = 1052,
|
|
7
|
-
am_AM = 1118,
|
|
8
|
-
ar_DZ = 5121,
|
|
9
|
-
ar_BH = 15361,
|
|
10
|
-
ar_EG = 3073,
|
|
11
|
-
ar_IQ = 2049,
|
|
12
|
-
ar_JO = 11265,
|
|
13
|
-
ar_KW = 13313,
|
|
14
|
-
ar_LB = 12289,
|
|
15
|
-
ar_LY = 4097,
|
|
16
|
-
ar_MA = 6145,
|
|
17
|
-
ar_OM = 8193,
|
|
18
|
-
ar_QA = 16385,
|
|
19
|
-
ar_SA = 1025,
|
|
20
|
-
ar_SY = 10241,
|
|
21
|
-
ar_TN = 7169,
|
|
22
|
-
ar_AE = 14337,
|
|
23
|
-
ar_YE = 9217,
|
|
24
|
-
hy_AM = 1067,
|
|
25
|
-
as_AS = 1101,
|
|
26
|
-
az_AZ_Cyrl = 2092,
|
|
27
|
-
az_AZ_Latn = 2093,
|
|
28
|
-
eu_ES = 1069,
|
|
29
|
-
be_BY = 1059,
|
|
30
|
-
bg_BG = 1026,
|
|
31
|
-
ca_ES = 1027,
|
|
32
|
-
zh_HK = 3076,
|
|
33
|
-
zh_MO = 5124,
|
|
34
|
-
zh_CN = 2052,
|
|
35
|
-
zh_SG = 4100,
|
|
36
|
-
zh_TW = 1028,
|
|
37
|
-
hr_HR = 1050,
|
|
38
|
-
cd_CZ = 1029,
|
|
39
|
-
da_DK = 1030,
|
|
40
|
-
nl_BE = 2067,
|
|
41
|
-
nl_NL = 1043,
|
|
42
|
-
en_AU = 3081,
|
|
43
|
-
en_BZ = 10249,
|
|
44
|
-
en_CA = 4105,
|
|
45
|
-
en_CB = 9225,
|
|
46
|
-
en_IE = 6153,
|
|
47
|
-
en_IN = 16393,
|
|
48
|
-
en_JM = 8201,
|
|
49
|
-
en_NZ = 5129,
|
|
50
|
-
en_PH = 13321,
|
|
51
|
-
en_ZA = 7177,
|
|
52
|
-
en_TT = 11273,
|
|
53
|
-
en_ZW = 12297,
|
|
54
|
-
en_US = 1033,
|
|
55
|
-
en_UK = 2057,
|
|
56
|
-
et_EE = 1061,
|
|
57
|
-
fo_FO = 1080,
|
|
58
|
-
fi_FI = 1035,
|
|
59
|
-
fr_BE = 2060,
|
|
60
|
-
fr_CA = 11276,
|
|
61
|
-
fr_FR = 1036,
|
|
62
|
-
fr_LU = 5132,
|
|
63
|
-
fr_MC = 6156,
|
|
64
|
-
fr_CH = 4108,
|
|
65
|
-
gl_ES = 1110,
|
|
66
|
-
de_AT = 3079,
|
|
67
|
-
de_DE = 1031,
|
|
68
|
-
de_LI = 5127,
|
|
69
|
-
de_LU = 4103,
|
|
70
|
-
de_CH = 2055,
|
|
71
|
-
gu_IN = 1095,
|
|
72
|
-
he_IL = 1037,
|
|
73
|
-
hi_IN = 1081,
|
|
74
|
-
hu_HU = 1038,
|
|
75
|
-
is_IS = 1039,
|
|
76
|
-
id_ID = 1057,
|
|
77
|
-
it_IT = 1040,
|
|
78
|
-
it_CH = 2064,
|
|
79
|
-
ja_JP = 1041,
|
|
80
|
-
kn_IN = 1099,
|
|
81
|
-
kk_KZ = 1087,
|
|
82
|
-
ko_KR = 1042,
|
|
83
|
-
ky_KZ = 1088,
|
|
84
|
-
lv_LV = 1062,
|
|
85
|
-
lt_LT = 1063,
|
|
86
|
-
ms_BN = 2110,
|
|
87
|
-
ms_MY = 1086,
|
|
88
|
-
mr_IN = 1102,
|
|
89
|
-
mn_MN = 2128,
|
|
90
|
-
nb_NO = 1044,
|
|
91
|
-
nn_NO = 2068,
|
|
92
|
-
pl_PL = 1045,
|
|
93
|
-
pt_BR = 1046,
|
|
94
|
-
pt_PT = 2070,
|
|
95
|
-
pa_IN = 1094,
|
|
96
|
-
ro_MO = 2072,
|
|
97
|
-
ro_RO = 1048,
|
|
98
|
-
ru_RU = 1049,
|
|
99
|
-
ru_MO = 2073,
|
|
100
|
-
sa_IN = 1103,
|
|
101
|
-
sr_SP_Cyrl = 3098,
|
|
102
|
-
sr_SP_Latn = 2074,
|
|
103
|
-
sk_SK = 1051,
|
|
104
|
-
sl_SI = 1060,
|
|
105
|
-
es_AR = 11274,
|
|
106
|
-
es_BO = 16394,
|
|
107
|
-
es_CL = 13322,
|
|
108
|
-
es_CO = 9226,
|
|
109
|
-
es_CR = 5130,
|
|
110
|
-
es_DO = 7178,
|
|
111
|
-
es_EC = 12298,
|
|
112
|
-
es_SV = 17418,
|
|
113
|
-
es_GT = 4106,
|
|
114
|
-
es_HN = 18442,
|
|
115
|
-
es_MX = 2058,
|
|
116
|
-
es_NI = 19466,
|
|
117
|
-
es_PA = 6154,
|
|
118
|
-
es_PY = 15370,
|
|
119
|
-
es_PE = 10250,
|
|
120
|
-
es_PR = 20490,
|
|
121
|
-
es_ES = 1034,
|
|
122
|
-
es_UY = 14346,
|
|
123
|
-
es_VE = 8202,
|
|
124
|
-
sw_KE = 1089,
|
|
125
|
-
sv_FI = 2077,
|
|
126
|
-
sv_SE = 1053,
|
|
127
|
-
ta_IN = 1097,
|
|
128
|
-
tt_RU = 1092,
|
|
129
|
-
te_IN = 1098,
|
|
130
|
-
th_TH = 1054,
|
|
131
|
-
tr_TR = 1055,
|
|
132
|
-
uz_UZ_Cyrl = 2115,
|
|
133
|
-
uz_UZ_Latn = 1091,
|
|
134
|
-
vi_VN = 1066
|
|
135
|
-
}
|
|
1
|
+
/**@format */
|
|
2
|
+
/** International Area name and its code */
|
|
3
|
+
export declare enum AreaCode {
|
|
4
|
+
unknown = 0,
|
|
5
|
+
af_ZA = 1078,
|
|
6
|
+
sq_AL = 1052,
|
|
7
|
+
am_AM = 1118,
|
|
8
|
+
ar_DZ = 5121,
|
|
9
|
+
ar_BH = 15361,
|
|
10
|
+
ar_EG = 3073,
|
|
11
|
+
ar_IQ = 2049,
|
|
12
|
+
ar_JO = 11265,
|
|
13
|
+
ar_KW = 13313,
|
|
14
|
+
ar_LB = 12289,
|
|
15
|
+
ar_LY = 4097,
|
|
16
|
+
ar_MA = 6145,
|
|
17
|
+
ar_OM = 8193,
|
|
18
|
+
ar_QA = 16385,
|
|
19
|
+
ar_SA = 1025,
|
|
20
|
+
ar_SY = 10241,
|
|
21
|
+
ar_TN = 7169,
|
|
22
|
+
ar_AE = 14337,
|
|
23
|
+
ar_YE = 9217,
|
|
24
|
+
hy_AM = 1067,
|
|
25
|
+
as_AS = 1101,
|
|
26
|
+
az_AZ_Cyrl = 2092,
|
|
27
|
+
az_AZ_Latn = 2093,
|
|
28
|
+
eu_ES = 1069,
|
|
29
|
+
be_BY = 1059,
|
|
30
|
+
bg_BG = 1026,
|
|
31
|
+
ca_ES = 1027,
|
|
32
|
+
zh_HK = 3076,
|
|
33
|
+
zh_MO = 5124,
|
|
34
|
+
zh_CN = 2052,
|
|
35
|
+
zh_SG = 4100,
|
|
36
|
+
zh_TW = 1028,
|
|
37
|
+
hr_HR = 1050,
|
|
38
|
+
cd_CZ = 1029,
|
|
39
|
+
da_DK = 1030,
|
|
40
|
+
nl_BE = 2067,
|
|
41
|
+
nl_NL = 1043,
|
|
42
|
+
en_AU = 3081,
|
|
43
|
+
en_BZ = 10249,
|
|
44
|
+
en_CA = 4105,
|
|
45
|
+
en_CB = 9225,
|
|
46
|
+
en_IE = 6153,
|
|
47
|
+
en_IN = 16393,
|
|
48
|
+
en_JM = 8201,
|
|
49
|
+
en_NZ = 5129,
|
|
50
|
+
en_PH = 13321,
|
|
51
|
+
en_ZA = 7177,
|
|
52
|
+
en_TT = 11273,
|
|
53
|
+
en_ZW = 12297,
|
|
54
|
+
en_US = 1033,
|
|
55
|
+
en_UK = 2057,
|
|
56
|
+
et_EE = 1061,
|
|
57
|
+
fo_FO = 1080,
|
|
58
|
+
fi_FI = 1035,
|
|
59
|
+
fr_BE = 2060,
|
|
60
|
+
fr_CA = 11276,
|
|
61
|
+
fr_FR = 1036,
|
|
62
|
+
fr_LU = 5132,
|
|
63
|
+
fr_MC = 6156,
|
|
64
|
+
fr_CH = 4108,
|
|
65
|
+
gl_ES = 1110,
|
|
66
|
+
de_AT = 3079,
|
|
67
|
+
de_DE = 1031,
|
|
68
|
+
de_LI = 5127,
|
|
69
|
+
de_LU = 4103,
|
|
70
|
+
de_CH = 2055,
|
|
71
|
+
gu_IN = 1095,
|
|
72
|
+
he_IL = 1037,
|
|
73
|
+
hi_IN = 1081,
|
|
74
|
+
hu_HU = 1038,
|
|
75
|
+
is_IS = 1039,
|
|
76
|
+
id_ID = 1057,
|
|
77
|
+
it_IT = 1040,
|
|
78
|
+
it_CH = 2064,
|
|
79
|
+
ja_JP = 1041,
|
|
80
|
+
kn_IN = 1099,
|
|
81
|
+
kk_KZ = 1087,
|
|
82
|
+
ko_KR = 1042,
|
|
83
|
+
ky_KZ = 1088,
|
|
84
|
+
lv_LV = 1062,
|
|
85
|
+
lt_LT = 1063,
|
|
86
|
+
ms_BN = 2110,
|
|
87
|
+
ms_MY = 1086,
|
|
88
|
+
mr_IN = 1102,
|
|
89
|
+
mn_MN = 2128,
|
|
90
|
+
nb_NO = 1044,
|
|
91
|
+
nn_NO = 2068,
|
|
92
|
+
pl_PL = 1045,
|
|
93
|
+
pt_BR = 1046,
|
|
94
|
+
pt_PT = 2070,
|
|
95
|
+
pa_IN = 1094,
|
|
96
|
+
ro_MO = 2072,
|
|
97
|
+
ro_RO = 1048,
|
|
98
|
+
ru_RU = 1049,
|
|
99
|
+
ru_MO = 2073,
|
|
100
|
+
sa_IN = 1103,
|
|
101
|
+
sr_SP_Cyrl = 3098,
|
|
102
|
+
sr_SP_Latn = 2074,
|
|
103
|
+
sk_SK = 1051,
|
|
104
|
+
sl_SI = 1060,
|
|
105
|
+
es_AR = 11274,
|
|
106
|
+
es_BO = 16394,
|
|
107
|
+
es_CL = 13322,
|
|
108
|
+
es_CO = 9226,
|
|
109
|
+
es_CR = 5130,
|
|
110
|
+
es_DO = 7178,
|
|
111
|
+
es_EC = 12298,
|
|
112
|
+
es_SV = 17418,
|
|
113
|
+
es_GT = 4106,
|
|
114
|
+
es_HN = 18442,
|
|
115
|
+
es_MX = 2058,
|
|
116
|
+
es_NI = 19466,
|
|
117
|
+
es_PA = 6154,
|
|
118
|
+
es_PY = 15370,
|
|
119
|
+
es_PE = 10250,
|
|
120
|
+
es_PR = 20490,
|
|
121
|
+
es_ES = 1034,
|
|
122
|
+
es_UY = 14346,
|
|
123
|
+
es_VE = 8202,
|
|
124
|
+
sw_KE = 1089,
|
|
125
|
+
sv_FI = 2077,
|
|
126
|
+
sv_SE = 1053,
|
|
127
|
+
ta_IN = 1097,
|
|
128
|
+
tt_RU = 1092,
|
|
129
|
+
te_IN = 1098,
|
|
130
|
+
th_TH = 1054,
|
|
131
|
+
tr_TR = 1055,
|
|
132
|
+
uz_UZ_Cyrl = 2115,
|
|
133
|
+
uz_UZ_Latn = 1091,
|
|
134
|
+
vi_VN = 1066
|
|
135
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/**@format */
|
|
2
|
-
/** Exception base class */
|
|
3
|
-
export declare class Exception extends Error {
|
|
4
|
-
constructor(msg?: string, options?: ErrorOptions);
|
|
5
|
-
/**
|
|
6
|
-
* Get a string of the Exception object
|
|
7
|
-
*
|
|
8
|
-
* @returns return an error message
|
|
9
|
-
*/
|
|
10
|
-
toString(): string;
|
|
11
|
-
}
|
|
1
|
+
/**@format */
|
|
2
|
+
/** Exception base class */
|
|
3
|
+
export declare class Exception extends Error {
|
|
4
|
+
constructor(msg?: string, options?: ErrorOptions);
|
|
5
|
+
/**
|
|
6
|
+
* Get a string of the Exception object
|
|
7
|
+
*
|
|
8
|
+
* @returns return an error message
|
|
9
|
+
*/
|
|
10
|
+
toString(): string;
|
|
11
|
+
}
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
/**@format */
|
|
2
|
-
/** Tianyu Log Level */
|
|
3
|
-
export declare enum LogLevel {
|
|
4
|
-
/** Debug mode log */
|
|
5
|
-
DEBUG = 0,
|
|
6
|
-
/** error msg */
|
|
7
|
-
ERROR = 1,
|
|
8
|
-
/** fatal error msg */
|
|
9
|
-
FATAL = 2,
|
|
10
|
-
/** info log */
|
|
11
|
-
INFO = 3,
|
|
12
|
-
/** warning log */
|
|
13
|
-
WARNING = 4,
|
|
14
|
-
/** default log */
|
|
15
|
-
LOG = 5
|
|
16
|
-
}
|
|
17
|
-
/** Tianyu Log Interface */
|
|
18
|
-
export interface ILog {
|
|
19
|
-
/**
|
|
20
|
-
* Write a console log with specified log level
|
|
21
|
-
*
|
|
22
|
-
* @param msg the message body
|
|
23
|
-
* @param level the console log level, if not be specified, to print as default log
|
|
24
|
-
* @param timer a boolean value indicates whether needs to add a timestamp for the log
|
|
25
|
-
*/
|
|
26
|
-
log(msg: string, level?: LogLevel, timer?: boolean): void;
|
|
27
|
-
/**
|
|
28
|
-
* Write a console info log
|
|
29
|
-
* @param msg the message body
|
|
30
|
-
* @param timer a boolean value indicates whether needs to add a timestamp for the log
|
|
31
|
-
*/
|
|
32
|
-
info(msg: string, timer?: boolean): void;
|
|
33
|
-
/**
|
|
34
|
-
* Write a console warning log
|
|
35
|
-
* @param msg the message body
|
|
36
|
-
* @param timer a boolean value indicates whether needs to add a timestamp for the log
|
|
37
|
-
*/
|
|
38
|
-
warn(msg: string, timer?: boolean): void;
|
|
39
|
-
/**
|
|
40
|
-
* Write a console debug log
|
|
41
|
-
* @param msg the message body
|
|
42
|
-
* @param timer a boolean value indicates whether needs to add a timestamp for the log
|
|
43
|
-
*/
|
|
44
|
-
debug(msg: string, timer?: boolean): void;
|
|
45
|
-
/**
|
|
46
|
-
* Write a console error message
|
|
47
|
-
* @param msg the message body
|
|
48
|
-
* @param timer a boolean value indicates whether needs to add a timestamp for the log
|
|
49
|
-
*/
|
|
50
|
-
error(msg: string, timer?: boolean): void;
|
|
51
|
-
/**
|
|
52
|
-
* Write a console fatal message
|
|
53
|
-
* @param msg the message body
|
|
54
|
-
* @param timer a boolean value indicates whether needs to add a timestamp for the log
|
|
55
|
-
*/
|
|
56
|
-
fatal(msg: string, timer?: boolean): void;
|
|
57
|
-
}
|
|
58
|
-
/** Tianyu Performance recorder */
|
|
59
|
-
export interface IPerfRecorder {
|
|
60
|
-
/** the recording id */
|
|
61
|
-
id: string;
|
|
62
|
-
/** the start time number */
|
|
63
|
-
start: number;
|
|
64
|
-
}
|
|
1
|
+
/**@format */
|
|
2
|
+
/** Tianyu Log Level */
|
|
3
|
+
export declare enum LogLevel {
|
|
4
|
+
/** Debug mode log */
|
|
5
|
+
DEBUG = 0,
|
|
6
|
+
/** error msg */
|
|
7
|
+
ERROR = 1,
|
|
8
|
+
/** fatal error msg */
|
|
9
|
+
FATAL = 2,
|
|
10
|
+
/** info log */
|
|
11
|
+
INFO = 3,
|
|
12
|
+
/** warning log */
|
|
13
|
+
WARNING = 4,
|
|
14
|
+
/** default log */
|
|
15
|
+
LOG = 5
|
|
16
|
+
}
|
|
17
|
+
/** Tianyu Log Interface */
|
|
18
|
+
export interface ILog {
|
|
19
|
+
/**
|
|
20
|
+
* Write a console log with specified log level
|
|
21
|
+
*
|
|
22
|
+
* @param msg the message body
|
|
23
|
+
* @param level the console log level, if not be specified, to print as default log
|
|
24
|
+
* @param timer a boolean value indicates whether needs to add a timestamp for the log
|
|
25
|
+
*/
|
|
26
|
+
log(msg: string, level?: LogLevel, timer?: boolean): void;
|
|
27
|
+
/**
|
|
28
|
+
* Write a console info log
|
|
29
|
+
* @param msg the message body
|
|
30
|
+
* @param timer a boolean value indicates whether needs to add a timestamp for the log
|
|
31
|
+
*/
|
|
32
|
+
info(msg: string, timer?: boolean): void;
|
|
33
|
+
/**
|
|
34
|
+
* Write a console warning log
|
|
35
|
+
* @param msg the message body
|
|
36
|
+
* @param timer a boolean value indicates whether needs to add a timestamp for the log
|
|
37
|
+
*/
|
|
38
|
+
warn(msg: string, timer?: boolean): void;
|
|
39
|
+
/**
|
|
40
|
+
* Write a console debug log
|
|
41
|
+
* @param msg the message body
|
|
42
|
+
* @param timer a boolean value indicates whether needs to add a timestamp for the log
|
|
43
|
+
*/
|
|
44
|
+
debug(msg: string, timer?: boolean): void;
|
|
45
|
+
/**
|
|
46
|
+
* Write a console error message
|
|
47
|
+
* @param msg the message body
|
|
48
|
+
* @param timer a boolean value indicates whether needs to add a timestamp for the log
|
|
49
|
+
*/
|
|
50
|
+
error(msg: string, timer?: boolean): void;
|
|
51
|
+
/**
|
|
52
|
+
* Write a console fatal message
|
|
53
|
+
* @param msg the message body
|
|
54
|
+
* @param timer a boolean value indicates whether needs to add a timestamp for the log
|
|
55
|
+
*/
|
|
56
|
+
fatal(msg: string, timer?: boolean): void;
|
|
57
|
+
}
|
|
58
|
+
/** Tianyu Performance recorder */
|
|
59
|
+
export interface IPerfRecorder {
|
|
60
|
+
/** the recording id */
|
|
61
|
+
id: string;
|
|
62
|
+
/** the start time number */
|
|
63
|
+
start: number;
|
|
64
|
+
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
/**@format */
|
|
2
|
-
import { TMap } from "./TMap";
|
|
3
|
-
import { PathBase } from "./PathBase";
|
|
4
|
-
/** Tianyu Object calculated different item */
|
|
5
|
-
export interface IObjectDiffInfo {
|
|
6
|
-
/** different item path */
|
|
7
|
-
path: string;
|
|
8
|
-
/** the old value of this path */
|
|
9
|
-
old: any;
|
|
10
|
-
/** the new value of this path */
|
|
11
|
-
new: any;
|
|
12
|
-
/** does the change be deletion */
|
|
13
|
-
deleted?: true;
|
|
14
|
-
/** does the change be adding */
|
|
15
|
-
added?: true;
|
|
16
|
-
}
|
|
17
|
-
/** Different items map */
|
|
18
|
-
export type ObjectDiffMap = TMap<PathBase, IObjectDiffInfo>;
|
|
1
|
+
/**@format */
|
|
2
|
+
import { TMap } from "./TMap";
|
|
3
|
+
import { PathBase } from "./PathBase";
|
|
4
|
+
/** Tianyu Object calculated different item */
|
|
5
|
+
export interface IObjectDiffInfo {
|
|
6
|
+
/** different item path */
|
|
7
|
+
path: string;
|
|
8
|
+
/** the old value of this path */
|
|
9
|
+
old: any;
|
|
10
|
+
/** the new value of this path */
|
|
11
|
+
new: any;
|
|
12
|
+
/** does the change be deletion */
|
|
13
|
+
deleted?: true;
|
|
14
|
+
/** does the change be adding */
|
|
15
|
+
added?: true;
|
|
16
|
+
}
|
|
17
|
+
/** Different items map */
|
|
18
|
+
export type ObjectDiffMap = TMap<PathBase, IObjectDiffInfo>;
|
|
@@ -1,76 +1,76 @@
|
|
|
1
|
-
/**@format */
|
|
2
|
-
import { IComparable } from "./Types";
|
|
3
|
-
/** Path base class */
|
|
4
|
-
export declare class PathBase implements IComparable {
|
|
5
|
-
protected _dirs: string[];
|
|
6
|
-
/**
|
|
7
|
-
* Create a Path instance by specified dirs
|
|
8
|
-
*
|
|
9
|
-
* @param dirs the specified directories
|
|
10
|
-
*/
|
|
11
|
-
constructor(dirs?: string[]);
|
|
12
|
-
/**
|
|
13
|
-
* Convert the path instance to string
|
|
14
|
-
*
|
|
15
|
-
* @returns return the fromatted string
|
|
16
|
-
*/
|
|
17
|
-
toString(): string;
|
|
18
|
-
/**
|
|
19
|
-
* Iterator of path directories
|
|
20
|
-
*
|
|
21
|
-
* @returns return an iterator
|
|
22
|
-
*/
|
|
23
|
-
[Symbol.iterator](): {
|
|
24
|
-
next: () => {
|
|
25
|
-
done: boolean;
|
|
26
|
-
value: string;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Get a directories array deep copy
|
|
31
|
-
*
|
|
32
|
-
* @returns return directories
|
|
33
|
-
*/
|
|
34
|
-
getDirs(): string[];
|
|
35
|
-
/**
|
|
36
|
-
* Get a number that indicates the directories count
|
|
37
|
-
*
|
|
38
|
-
* @returns return the directories count
|
|
39
|
-
*/
|
|
40
|
-
length(): number;
|
|
41
|
-
/**
|
|
42
|
-
* Append a new directory to the end of path
|
|
43
|
-
*
|
|
44
|
-
* @param dir the new directory name
|
|
45
|
-
* @returns return the new directories count
|
|
46
|
-
*/
|
|
47
|
-
append(dir: string): number;
|
|
48
|
-
/**
|
|
49
|
-
* Clean all the pathes
|
|
50
|
-
*/
|
|
51
|
-
clear(): void;
|
|
52
|
-
/**
|
|
53
|
-
* Remove the end directory of the path instance and return it
|
|
54
|
-
*
|
|
55
|
-
* @returns return the end of directory
|
|
56
|
-
*/
|
|
57
|
-
pop(): string | undefined;
|
|
58
|
-
/**
|
|
59
|
-
* Remove the first directory of the path instance and return it
|
|
60
|
-
*
|
|
61
|
-
* @returns return the first directory
|
|
62
|
-
*/
|
|
63
|
-
shift(): string | undefined;
|
|
64
|
-
/**
|
|
65
|
-
* Convert the path instance to string for object comparing
|
|
66
|
-
*
|
|
67
|
-
* @returns return the comparable string
|
|
68
|
-
*/
|
|
69
|
-
getString(): string;
|
|
70
|
-
/**
|
|
71
|
-
* Get the hashcode of current path
|
|
72
|
-
*
|
|
73
|
-
* @returns always return 0
|
|
74
|
-
*/
|
|
75
|
-
getHashCode(): number;
|
|
76
|
-
}
|
|
1
|
+
/**@format */
|
|
2
|
+
import { IComparable } from "./Types";
|
|
3
|
+
/** Path base class */
|
|
4
|
+
export declare class PathBase implements IComparable {
|
|
5
|
+
protected _dirs: string[];
|
|
6
|
+
/**
|
|
7
|
+
* Create a Path instance by specified dirs
|
|
8
|
+
*
|
|
9
|
+
* @param dirs the specified directories
|
|
10
|
+
*/
|
|
11
|
+
constructor(dirs?: string[]);
|
|
12
|
+
/**
|
|
13
|
+
* Convert the path instance to string
|
|
14
|
+
*
|
|
15
|
+
* @returns return the fromatted string
|
|
16
|
+
*/
|
|
17
|
+
toString(): string;
|
|
18
|
+
/**
|
|
19
|
+
* Iterator of path directories
|
|
20
|
+
*
|
|
21
|
+
* @returns return an iterator
|
|
22
|
+
*/
|
|
23
|
+
[Symbol.iterator](): {
|
|
24
|
+
next: () => {
|
|
25
|
+
done: boolean;
|
|
26
|
+
value: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Get a directories array deep copy
|
|
31
|
+
*
|
|
32
|
+
* @returns return directories
|
|
33
|
+
*/
|
|
34
|
+
getDirs(): string[];
|
|
35
|
+
/**
|
|
36
|
+
* Get a number that indicates the directories count
|
|
37
|
+
*
|
|
38
|
+
* @returns return the directories count
|
|
39
|
+
*/
|
|
40
|
+
length(): number;
|
|
41
|
+
/**
|
|
42
|
+
* Append a new directory to the end of path
|
|
43
|
+
*
|
|
44
|
+
* @param dir the new directory name
|
|
45
|
+
* @returns return the new directories count
|
|
46
|
+
*/
|
|
47
|
+
append(dir: string): number;
|
|
48
|
+
/**
|
|
49
|
+
* Clean all the pathes
|
|
50
|
+
*/
|
|
51
|
+
clear(): void;
|
|
52
|
+
/**
|
|
53
|
+
* Remove the end directory of the path instance and return it
|
|
54
|
+
*
|
|
55
|
+
* @returns return the end of directory
|
|
56
|
+
*/
|
|
57
|
+
pop(): string | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* Remove the first directory of the path instance and return it
|
|
60
|
+
*
|
|
61
|
+
* @returns return the first directory
|
|
62
|
+
*/
|
|
63
|
+
shift(): string | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Convert the path instance to string for object comparing
|
|
66
|
+
*
|
|
67
|
+
* @returns return the comparable string
|
|
68
|
+
*/
|
|
69
|
+
getString(): string;
|
|
70
|
+
/**
|
|
71
|
+
* Get the hashcode of current path
|
|
72
|
+
*
|
|
73
|
+
* @returns always return 0
|
|
74
|
+
*/
|
|
75
|
+
getHashCode(): number;
|
|
76
|
+
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
/**@format */
|
|
2
|
-
/** Encrypt Option Type */
|
|
3
|
-
export declare enum EncryptOption {
|
|
4
|
-
Encryption = 0,
|
|
5
|
-
Decryption = 1
|
|
6
|
-
}
|
|
7
|
-
/** An Interface of the Cipher */
|
|
8
|
-
export interface ICipher {
|
|
9
|
-
/**
|
|
10
|
-
* To encode the source value
|
|
11
|
-
*
|
|
12
|
-
* @param source the source value
|
|
13
|
-
* @returns return the encoded value
|
|
14
|
-
*/
|
|
15
|
-
encryption(source: number[]): number[];
|
|
16
|
-
/**
|
|
17
|
-
* To decode the encoded value
|
|
18
|
-
*
|
|
19
|
-
* @param source the encoded value
|
|
20
|
-
* @returns return the decoded value
|
|
21
|
-
*/
|
|
22
|
-
decryption(source: number[]): number[];
|
|
23
|
-
}
|
|
1
|
+
/**@format */
|
|
2
|
+
/** Encrypt Option Type */
|
|
3
|
+
export declare enum EncryptOption {
|
|
4
|
+
Encryption = 0,
|
|
5
|
+
Decryption = 1
|
|
6
|
+
}
|
|
7
|
+
/** An Interface of the Cipher */
|
|
8
|
+
export interface ICipher {
|
|
9
|
+
/**
|
|
10
|
+
* To encode the source value
|
|
11
|
+
*
|
|
12
|
+
* @param source the source value
|
|
13
|
+
* @returns return the encoded value
|
|
14
|
+
*/
|
|
15
|
+
encryption(source: number[]): number[];
|
|
16
|
+
/**
|
|
17
|
+
* To decode the encoded value
|
|
18
|
+
*
|
|
19
|
+
* @param source the encoded value
|
|
20
|
+
* @returns return the decoded value
|
|
21
|
+
*/
|
|
22
|
+
decryption(source: number[]): number[];
|
|
23
|
+
}
|