@aitianyu.cn/types 0.1.2 → 0.1.3

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 (66) hide show
  1. package/README.md +44 -0
  2. package/dist/lib/coding/Error.js +16 -6
  3. package/dist/lib/coding/Path.js +41 -20
  4. package/dist/lib/core/Environment.js +14 -0
  5. package/dist/lib/core/Errors.js +34 -13
  6. package/dist/lib/core/Language.js +60 -7
  7. package/dist/lib/core/Log.js +34 -2
  8. package/dist/lib/core/TypeConvertion.js +20 -0
  9. package/dist/lib/core/object/ArrayHelper.js +15 -4
  10. package/dist/lib/core/object/Bytes.js +8 -4
  11. package/dist/lib/core/object/Calculater.js +109 -44
  12. package/dist/lib/core/object/DataView.js +13 -4
  13. package/dist/lib/core/object/Integer.js +57 -36
  14. package/dist/lib/core/object/Json.js +22 -10
  15. package/dist/lib/core/object/ObjectHelper.js +38 -14
  16. package/dist/lib/core/object/StringHelper.js +35 -8
  17. package/dist/lib/index.js +47 -6
  18. package/dist/lib/security/Base32.js +22 -13
  19. package/dist/lib/security/Guid.js +18 -1
  20. package/dist/lib/security/Hash.js +10 -1
  21. package/dist/lib/security/QRCode.js +16 -4
  22. package/dist/lib/security/RSA.js +33 -20
  23. package/dist/lib/security/SHA.js +25 -15
  24. package/dist/lib/security/TOTP.js +31 -9
  25. package/dist/lib/types/AreaCode.js +140 -131
  26. package/dist/lib/types/Exception.js +17 -3
  27. package/dist/lib/types/Logs.js +13 -7
  28. package/dist/lib/types/PathBase.js +43 -23
  29. package/dist/lib/types/Security.js +6 -1
  30. package/dist/lib/types/TMap.js +48 -30
  31. package/dist/types/coding/Error.d.ts +16 -6
  32. package/dist/types/coding/Path.d.ts +45 -21
  33. package/dist/types/core/Environment.d.ts +14 -0
  34. package/dist/types/core/Errors.d.ts +34 -13
  35. package/dist/types/core/Language.d.ts +33 -7
  36. package/dist/types/core/Log.d.ts +34 -2
  37. package/dist/types/core/TypeConvertion.d.ts +20 -0
  38. package/dist/types/core/interface/ITJSON.d.ts +11 -0
  39. package/dist/types/core/interface/ITianyuType.d.ts +11 -0
  40. package/dist/types/core/object/ArrayHelper.d.ts +15 -4
  41. package/dist/types/core/object/Bytes.d.ts +8 -4
  42. package/dist/types/core/object/Calculater.d.ts +38 -10
  43. package/dist/types/core/object/DataView.d.ts +13 -4
  44. package/dist/types/core/object/Integer.d.ts +57 -36
  45. package/dist/types/core/object/Json.d.ts +22 -10
  46. package/dist/types/core/object/ObjectHelper.d.ts +38 -14
  47. package/dist/types/core/object/StringHelper.d.ts +35 -8
  48. package/dist/types/index.d.ts +44 -0
  49. package/dist/types/security/Base32.d.ts +31 -18
  50. package/dist/types/security/Guid.d.ts +19 -1
  51. package/dist/types/security/Hash.d.ts +10 -1
  52. package/dist/types/security/QRCode.d.ts +16 -4
  53. package/dist/types/security/RSA.d.ts +51 -28
  54. package/dist/types/security/SHA.d.ts +25 -15
  55. package/dist/types/security/TOTP.d.ts +31 -9
  56. package/dist/types/types/AreaCode.d.ts +140 -1
  57. package/dist/types/types/Exception.d.ts +17 -3
  58. package/dist/types/types/Logs.d.ts +59 -30
  59. package/dist/types/types/Object.d.ts +16 -7
  60. package/dist/types/types/PathBase.d.ts +43 -23
  61. package/dist/types/types/Security.d.ts +21 -8
  62. package/dist/types/types/TMap.d.ts +48 -30
  63. package/dist/types/types/Types.d.ts +42 -10
  64. package/doc/en/README.md +372 -0
  65. package/doc/zh/README.md +372 -0
  66. package/package.json +3 -2
@@ -2,268 +2,277 @@
2
2
  /**@format */
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.AreaCode = void 0;
5
- /** International Area name and its code */
5
+ /**
6
+ * International locale area codes.
7
+ * Each member maps a locale identifier (language_Region) to its Windows LCID numeric value.
8
+ * Used throughout the library to represent language/region settings in a type-safe way.
9
+ *
10
+ * 国际语言环境区域码枚举。
11
+ * 每个成员将语言环境标识符(语言_地区)映射到对应的 Windows LCID 数值。
12
+ * 在整个库中用于以类型安全的方式表示语言/地区设置。
13
+ */
6
14
  var AreaCode;
7
15
  (function (AreaCode) {
16
+ /** Unknown / unrecognised locale. / 未知或无法识别的语言环境。 */
8
17
  AreaCode[AreaCode["unknown"] = 0] = "unknown";
9
- // Afrikaans (South Africa)
18
+ /** Afrikaans (South Africa) / 南非荷兰语(南非) */
10
19
  AreaCode[AreaCode["af_ZA"] = 1078] = "af_ZA";
11
- // Albanian (Albania)
20
+ /** Albanian (Albania) / 阿尔巴尼亚语(阿尔巴尼亚) */
12
21
  AreaCode[AreaCode["sq_AL"] = 1052] = "sq_AL";
13
- // Amharic (Amhara)
22
+ /** Amharic (Amhara) / 阿姆哈拉语(阿姆哈拉) */
14
23
  AreaCode[AreaCode["am_AM"] = 1118] = "am_AM";
15
- // Arabic (Algeria)
24
+ /** Arabic (Algeria) / 阿拉伯语(阿尔及利亚) */
16
25
  AreaCode[AreaCode["ar_DZ"] = 5121] = "ar_DZ";
17
- // Arabic (Bahrain)
26
+ /** Arabic (Bahrain) / 阿拉伯语(巴林) */
18
27
  AreaCode[AreaCode["ar_BH"] = 15361] = "ar_BH";
19
- // Arabic (Egypt)
28
+ /** Arabic (Egypt) / 阿拉伯语(埃及) */
20
29
  AreaCode[AreaCode["ar_EG"] = 3073] = "ar_EG";
21
- // Arabic (Iraq)
30
+ /** Arabic (Iraq) / 阿拉伯语(伊拉克) */
22
31
  AreaCode[AreaCode["ar_IQ"] = 2049] = "ar_IQ";
23
- // Arabic (Jordan)
32
+ /** Arabic (Jordan) / 阿拉伯语(约旦) */
24
33
  AreaCode[AreaCode["ar_JO"] = 11265] = "ar_JO";
25
- // Arabic (Kuwait)
34
+ /** Arabic (Kuwait) / 阿拉伯语(科威特) */
26
35
  AreaCode[AreaCode["ar_KW"] = 13313] = "ar_KW";
27
- // Arabic (Lebanon)
36
+ /** Arabic (Lebanon) / 阿拉伯语(黎巴嫩) */
28
37
  AreaCode[AreaCode["ar_LB"] = 12289] = "ar_LB";
29
- // Arabic (Libya)
38
+ /** Arabic (Libya) / 阿拉伯语(利比亚) */
30
39
  AreaCode[AreaCode["ar_LY"] = 4097] = "ar_LY";
31
- // Arabic (Morocco)
40
+ /** Arabic (Morocco) / 阿拉伯语(摩洛哥) */
32
41
  AreaCode[AreaCode["ar_MA"] = 6145] = "ar_MA";
33
- // Arabic (Oman)
42
+ /** Arabic (Oman) / 阿拉伯语(阿曼) */
34
43
  AreaCode[AreaCode["ar_OM"] = 8193] = "ar_OM";
35
- // Arabic (Qatar)
44
+ /** Arabic (Qatar) / 阿拉伯语(卡塔尔) */
36
45
  AreaCode[AreaCode["ar_QA"] = 16385] = "ar_QA";
37
- // Arabic (Saudi Arabia)
46
+ /** Arabic (Saudi Arabia) / 阿拉伯语(沙特阿拉伯) */
38
47
  AreaCode[AreaCode["ar_SA"] = 1025] = "ar_SA";
39
- // Arabic (Syria)
48
+ /** Arabic (Syria) / 阿拉伯语(叙利亚) */
40
49
  AreaCode[AreaCode["ar_SY"] = 10241] = "ar_SY";
41
- // Arabic (Tunisia)
50
+ /** Arabic (Tunisia) / 阿拉伯语(突尼斯) */
42
51
  AreaCode[AreaCode["ar_TN"] = 7169] = "ar_TN";
43
- // Arabic (United Arab Emirates)
52
+ /** Arabic (United Arab Emirates) / 阿拉伯语(阿联酋) */
44
53
  AreaCode[AreaCode["ar_AE"] = 14337] = "ar_AE";
45
- // Arabic (Yemen)
54
+ /** Arabic (Yemen) / 阿拉伯语(也门) */
46
55
  AreaCode[AreaCode["ar_YE"] = 9217] = "ar_YE";
47
- // Armenian (Armenian)
56
+ /** Armenian (Armenia) / 亚美尼亚语(亚美尼亚) */
48
57
  AreaCode[AreaCode["hy_AM"] = 1067] = "hy_AM";
49
- // Assamese (Assamese)
58
+ /** Assamese (India) / 阿萨姆语(印度) */
50
59
  AreaCode[AreaCode["as_AS"] = 1101] = "as_AS";
51
- // Azeri (Cyrillic)
60
+ /** Azeri — Cyrillic script (Azerbaijan) / 阿塞拜疆语——西里尔字母(阿塞拜疆) */
52
61
  AreaCode[AreaCode["az_AZ_Cyrl"] = 2092] = "az_AZ_Cyrl";
53
- // Azeri (Latin)
62
+ /** Azeri — Latin script (Azerbaijan) / 阿塞拜疆语——拉丁字母(阿塞拜疆) */
54
63
  AreaCode[AreaCode["az_AZ_Latn"] = 2093] = "az_AZ_Latn";
55
- // Segoe UI (Basque)
64
+ /** Basque (Basque Country) / 巴斯克语(巴斯克地区) */
56
65
  AreaCode[AreaCode["eu_ES"] = 1069] = "eu_ES";
57
- // Belarusian (Belarus)
66
+ /** Belarusian (Belarus) / 白俄罗斯语(白俄罗斯) */
58
67
  AreaCode[AreaCode["be_BY"] = 1059] = "be_BY";
59
- // Bulgarian (Bulgaria)
68
+ /** Bulgarian (Bulgaria) / 保加利亚语(保加利亚) */
60
69
  AreaCode[AreaCode["bg_BG"] = 1026] = "bg_BG";
61
- // Catalan (Catala)
70
+ /** Catalan (Catalonia) / 加泰罗尼亚语(加泰罗尼亚) */
62
71
  AreaCode[AreaCode["ca_ES"] = 1027] = "ca_ES";
63
- // Chinese (HongKong)
72
+ /** Chinese (Hong Kong SAR) / 中文(香港特别行政区) */
64
73
  AreaCode[AreaCode["zh_HK"] = 3076] = "zh_HK";
65
- // Chinese (Macau SAR)
74
+ /** Chinese (Macao SAR) / 中文(澳门特别行政区) */
66
75
  AreaCode[AreaCode["zh_MO"] = 5124] = "zh_MO";
67
- // Chinese (Simplified)
76
+ /** Chinese Simplified (Mainland China) / 简体中文(中国大陆) */
68
77
  AreaCode[AreaCode["zh_CN"] = 2052] = "zh_CN";
69
- // Chinese (Singapore)
78
+ /** Chinese (Singapore) / 中文(新加坡) */
70
79
  AreaCode[AreaCode["zh_SG"] = 4100] = "zh_SG";
71
- // Chinese (Taiwan)
80
+ /** Chinese Traditional (Taiwan) / 繁体中文(台湾) */
72
81
  AreaCode[AreaCode["zh_TW"] = 1028] = "zh_TW";
73
- // Croatian (Croatia)
82
+ /** Croatian (Croatia) / 克罗地亚语(克罗地亚) */
74
83
  AreaCode[AreaCode["hr_HR"] = 1050] = "hr_HR";
75
- // Czech (Czech)
84
+ /** Czech (Czech Republic) / 捷克语(捷克共和国) */
76
85
  AreaCode[AreaCode["cd_CZ"] = 1029] = "cd_CZ";
77
- // Danish (Denmark)
86
+ /** Danish (Denmark) / 丹麦语(丹麦) */
78
87
  AreaCode[AreaCode["da_DK"] = 1030] = "da_DK";
79
- // Netherlands (Belgium)
88
+ /** Dutch (Belgium) / 荷兰语(比利时) */
80
89
  AreaCode[AreaCode["nl_BE"] = 2067] = "nl_BE";
81
- // Netherlands (Netherlands)
90
+ /** Dutch (Netherlands) / 荷兰语(荷兰) */
82
91
  AreaCode[AreaCode["nl_NL"] = 1043] = "nl_NL";
83
- // English (Australia)
92
+ /** English (Australia) / 英语(澳大利亚) */
84
93
  AreaCode[AreaCode["en_AU"] = 3081] = "en_AU";
85
- // English (Belize)
94
+ /** English (Belize) / 英语(伯利兹) */
86
95
  AreaCode[AreaCode["en_BZ"] = 10249] = "en_BZ";
87
- // English (Canada)
96
+ /** English (Canada) / 英语(加拿大) */
88
97
  AreaCode[AreaCode["en_CA"] = 4105] = "en_CA";
89
- // English (Caribbean)
98
+ /** English (Caribbean) / 英语(加勒比地区) */
90
99
  AreaCode[AreaCode["en_CB"] = 9225] = "en_CB";
91
- // English (Ireland)
100
+ /** English (Ireland) / 英语(爱尔兰) */
92
101
  AreaCode[AreaCode["en_IE"] = 6153] = "en_IE";
93
- // English (India)
102
+ /** English (India) / 英语(印度) */
94
103
  AreaCode[AreaCode["en_IN"] = 16393] = "en_IN";
95
- // English (Jamaica)
104
+ /** English (Jamaica) / 英语(牙买加) */
96
105
  AreaCode[AreaCode["en_JM"] = 8201] = "en_JM";
97
- // English (New Zealand)
106
+ /** English (New Zealand) / 英语(新西兰) */
98
107
  AreaCode[AreaCode["en_NZ"] = 5129] = "en_NZ";
99
- // English (Phillippines)
108
+ /** English (Philippines) / 英语(菲律宾) */
100
109
  AreaCode[AreaCode["en_PH"] = 13321] = "en_PH";
101
- // English (Southern Africa)
110
+ /** English (South Africa) / 英语(南非) */
102
111
  AreaCode[AreaCode["en_ZA"] = 7177] = "en_ZA";
103
- // English (Trinidad)
112
+ /** English (Trinidad and Tobago) / 英语(特立尼达和多巴哥) */
104
113
  AreaCode[AreaCode["en_TT"] = 11273] = "en_TT";
105
- // English (Zimbabwe)
114
+ /** English (Zimbabwe) / 英语(津巴布韦) */
106
115
  AreaCode[AreaCode["en_ZW"] = 12297] = "en_ZW";
107
- // English (United States)
116
+ /** English (United States) / 英语(美国) */
108
117
  AreaCode[AreaCode["en_US"] = 1033] = "en_US";
109
- // English (United Kingdom)
118
+ /** English (United Kingdom) / 英语(英国) */
110
119
  AreaCode[AreaCode["en_UK"] = 2057] = "en_UK";
111
- // Estonian (Estonia)
120
+ /** Estonian (Estonia) / 爱沙尼亚语(爱沙尼亚) */
112
121
  AreaCode[AreaCode["et_EE"] = 1061] = "et_EE";
113
- // Faroese (Faeroes)
122
+ /** Faroese (Faroe Islands) / 法罗语(法罗群岛) */
114
123
  AreaCode[AreaCode["fo_FO"] = 1080] = "fo_FO";
115
- // Finnish (Finland)
124
+ /** Finnish (Finland) / 芬兰语(芬兰) */
116
125
  AreaCode[AreaCode["fi_FI"] = 1035] = "fi_FI";
117
- // French (Belgium)
126
+ /** French (Belgium) / 法语(比利时) */
118
127
  AreaCode[AreaCode["fr_BE"] = 2060] = "fr_BE";
119
- // French (Canada)
128
+ /** French (Canada) / 法语(加拿大) */
120
129
  AreaCode[AreaCode["fr_CA"] = 11276] = "fr_CA";
121
- // French (France)
130
+ /** French (France) / 法语(法国) */
122
131
  AreaCode[AreaCode["fr_FR"] = 1036] = "fr_FR";
123
- // French (Luxembourg)
132
+ /** French (Luxembourg) / 法语(卢森堡) */
124
133
  AreaCode[AreaCode["fr_LU"] = 5132] = "fr_LU";
125
- // French (Monaco)
134
+ /** French (Monaco) / 法语(摩纳哥) */
126
135
  AreaCode[AreaCode["fr_MC"] = 6156] = "fr_MC";
127
- // French (Switzerland)
136
+ /** French (Switzerland) / 法语(瑞士) */
128
137
  AreaCode[AreaCode["fr_CH"] = 4108] = "fr_CH";
129
- // Galician (Galicia)
138
+ /** Galician (Galicia, Spain) / 加利西亚语(西班牙加利西亚) */
130
139
  AreaCode[AreaCode["gl_ES"] = 1110] = "gl_ES";
131
- // German (Austria)
140
+ /** German (Austria) / 德语(奥地利) */
132
141
  AreaCode[AreaCode["de_AT"] = 3079] = "de_AT";
133
- // German (Germany)
142
+ /** German (Germany) / 德语(德国) */
134
143
  AreaCode[AreaCode["de_DE"] = 1031] = "de_DE";
135
- // German (Liechtenstein)
144
+ /** German (Liechtenstein) / 德语(列支敦士登) */
136
145
  AreaCode[AreaCode["de_LI"] = 5127] = "de_LI";
137
- // German (Luxembourg)
146
+ /** German (Luxembourg) / 德语(卢森堡) */
138
147
  AreaCode[AreaCode["de_LU"] = 4103] = "de_LU";
139
- // German (Switzerland)
148
+ /** German (Switzerland) / 德语(瑞士) */
140
149
  AreaCode[AreaCode["de_CH"] = 2055] = "de_CH";
141
- // Gujarati (India)
150
+ /** Gujarati (India) / 古吉拉特语(印度) */
142
151
  AreaCode[AreaCode["gu_IN"] = 1095] = "gu_IN";
143
- // Hebrew (Israel)
152
+ /** Hebrew (Israel) / 希伯来语(以色列) */
144
153
  AreaCode[AreaCode["he_IL"] = 1037] = "he_IL";
145
- // North Indian (India)
154
+ /** Hindi (India) / 印地语(印度) */
146
155
  AreaCode[AreaCode["hi_IN"] = 1081] = "hi_IN";
147
- // Hungarian (Hungary)
156
+ /** Hungarian (Hungary) / 匈牙利语(匈牙利) */
148
157
  AreaCode[AreaCode["hu_HU"] = 1038] = "hu_HU";
149
- // Icelandic (Iceland)
158
+ /** Icelandic (Iceland) / 冰岛语(冰岛) */
150
159
  AreaCode[AreaCode["is_IS"] = 1039] = "is_IS";
151
- // Indonesian (Indonesia)
160
+ /** Indonesian (Indonesia) / 印度尼西亚语(印度尼西亚) */
152
161
  AreaCode[AreaCode["id_ID"] = 1057] = "id_ID";
153
- // Italian (Italy)
162
+ /** Italian (Italy) / 意大利语(意大利) */
154
163
  AreaCode[AreaCode["it_IT"] = 1040] = "it_IT";
155
- // Italian (Switzerland)
164
+ /** Italian (Switzerland) / 意大利语(瑞士) */
156
165
  AreaCode[AreaCode["it_CH"] = 2064] = "it_CH";
157
- // Japanese (Japan)
166
+ /** Japanese (Japan) / 日语(日本) */
158
167
  AreaCode[AreaCode["ja_JP"] = 1041] = "ja_JP";
159
- // Kannada (India)
168
+ /** Kannada (India) / 卡纳达语(印度) */
160
169
  AreaCode[AreaCode["kn_IN"] = 1099] = "kn_IN";
161
- // Kazakh (Kazakhstan)
170
+ /** Kazakh (Kazakhstan) / 哈萨克语(哈萨克斯坦) */
162
171
  AreaCode[AreaCode["kk_KZ"] = 1087] = "kk_KZ";
163
- // Korean (Korea)
172
+ /** Korean (Korea) / 韩语(韩国) */
164
173
  AreaCode[AreaCode["ko_KR"] = 1042] = "ko_KR";
165
- // Kyrgyz (Kazakhstan)
174
+ /** Kyrgyz (Kyrgyzstan) / 柯尔克孜语(吉尔吉斯斯坦) */
166
175
  AreaCode[AreaCode["ky_KZ"] = 1088] = "ky_KZ";
167
- // Latvian (Latvian)
176
+ /** Latvian (Latvia) / 拉脱维亚语(拉脱维亚) */
168
177
  AreaCode[AreaCode["lv_LV"] = 1062] = "lv_LV";
169
- // Lithuanian (Lithuania)
178
+ /** Lithuanian (Lithuania) / 立陶宛语(立陶宛) */
170
179
  AreaCode[AreaCode["lt_LT"] = 1063] = "lt_LT";
171
- // Malay (Brunei)
180
+ /** Malay (Brunei) / 马来语(文莱) */
172
181
  AreaCode[AreaCode["ms_BN"] = 2110] = "ms_BN";
173
- // Malay (Malaysia)
182
+ /** Malay (Malaysia) / 马来语(马来西亚) */
174
183
  AreaCode[AreaCode["ms_MY"] = 1086] = "ms_MY";
175
- // Marathi (India)
184
+ /** Marathi (India) / 马拉地语(印度) */
176
185
  AreaCode[AreaCode["mr_IN"] = 1102] = "mr_IN";
177
- // Mongolian (Mongolia)
186
+ /** Mongolian (Mongolia) / 蒙古语(蒙古国) */
178
187
  AreaCode[AreaCode["mn_MN"] = 2128] = "mn_MN";
179
- // Norwegian (Bokml)
188
+ /** Norwegian Bokmål (Norway) / 挪威书面语(挪威) */
180
189
  AreaCode[AreaCode["nb_NO"] = 1044] = "nb_NO";
181
- // Norwegian (Nynorsk)
190
+ /** Norwegian Nynorsk (Norway) / 挪威新挪威语(挪威) */
182
191
  AreaCode[AreaCode["nn_NO"] = 2068] = "nn_NO";
183
- // Polish (Polish)
192
+ /** Polish (Poland) / 波兰语(波兰) */
184
193
  AreaCode[AreaCode["pl_PL"] = 1045] = "pl_PL";
185
- // Portuguese (Brazil)
194
+ /** Portuguese (Brazil) / 葡萄牙语(巴西) */
186
195
  AreaCode[AreaCode["pt_BR"] = 1046] = "pt_BR";
187
- // Portuguese (Portugal)
196
+ /** Portuguese (Portugal) / 葡萄牙语(葡萄牙) */
188
197
  AreaCode[AreaCode["pt_PT"] = 2070] = "pt_PT";
189
- // Punjab (India)
198
+ /** Punjabi (India) / 旁遮普语(印度) */
190
199
  AreaCode[AreaCode["pa_IN"] = 1094] = "pa_IN";
191
- // Romanian (Moldova)
200
+ /** Romanian (Moldova) / 罗马尼亚语(摩尔多瓦) */
192
201
  AreaCode[AreaCode["ro_MO"] = 2072] = "ro_MO";
193
- // Romanian (Romania)
202
+ /** Romanian (Romania) / 罗马尼亚语(罗马尼亚) */
194
203
  AreaCode[AreaCode["ro_RO"] = 1048] = "ro_RO";
195
- // Russian (Russia)
204
+ /** Russian (Russia) / 俄语(俄罗斯) */
196
205
  AreaCode[AreaCode["ru_RU"] = 1049] = "ru_RU";
197
- // Russian (Moldova)
206
+ /** Russian (Moldova) / 俄语(摩尔多瓦) */
198
207
  AreaCode[AreaCode["ru_MO"] = 2073] = "ru_MO";
199
- // Sanskrit (India)
208
+ /** Sanskrit (India) / 梵语(印度) */
200
209
  AreaCode[AreaCode["sa_IN"] = 1103] = "sa_IN";
201
- // Serbia (Serre - Cyrillic)
210
+ /** Serbian — Cyrillic script (Serbia) / 塞尔维亚语——西里尔字母(塞尔维亚) */
202
211
  AreaCode[AreaCode["sr_SP_Cyrl"] = 3098] = "sr_SP_Cyrl";
203
- // Serbia (Serre - Latin)
212
+ /** Serbian — Latin script (Serbia) / 塞尔维亚语——拉丁字母(塞尔维亚) */
204
213
  AreaCode[AreaCode["sr_SP_Latn"] = 2074] = "sr_SP_Latn";
205
- // Slovak (Slovak)
214
+ /** Slovak (Slovakia) / 斯洛伐克语(斯洛伐克) */
206
215
  AreaCode[AreaCode["sk_SK"] = 1051] = "sk_SK";
207
- // Slovenia (Slovenia)
216
+ /** Slovenian (Slovenia) / 斯洛文尼亚语(斯洛文尼亚) */
208
217
  AreaCode[AreaCode["sl_SI"] = 1060] = "sl_SI";
209
- // Spanish (Argentina)
218
+ /** Spanish (Argentina) / 西班牙语(阿根廷) */
210
219
  AreaCode[AreaCode["es_AR"] = 11274] = "es_AR";
211
- // Spanish (Bolivia)
220
+ /** Spanish (Bolivia) / 西班牙语(玻利维亚) */
212
221
  AreaCode[AreaCode["es_BO"] = 16394] = "es_BO";
213
- // Spanish (Chile)
222
+ /** Spanish (Chile) / 西班牙语(智利) */
214
223
  AreaCode[AreaCode["es_CL"] = 13322] = "es_CL";
215
- // Spanish (Colombia)
224
+ /** Spanish (Colombia) / 西班牙语(哥伦比亚) */
216
225
  AreaCode[AreaCode["es_CO"] = 9226] = "es_CO";
217
- // Spanish (Costa Rica)
226
+ /** Spanish (Costa Rica) / 西班牙语(哥斯达黎加) */
218
227
  AreaCode[AreaCode["es_CR"] = 5130] = "es_CR";
219
- // Spanish (Dominican Republic)
228
+ /** Spanish (Dominican Republic) / 西班牙语(多米尼加共和国) */
220
229
  AreaCode[AreaCode["es_DO"] = 7178] = "es_DO";
221
- // Spanish (Ecuador)
230
+ /** Spanish (Ecuador) / 西班牙语(厄瓜多尔) */
222
231
  AreaCode[AreaCode["es_EC"] = 12298] = "es_EC";
223
- // Spanish (Salvador)
232
+ /** Spanish (El Salvador) / 西班牙语(萨尔瓦多) */
224
233
  AreaCode[AreaCode["es_SV"] = 17418] = "es_SV";
225
- // Spanish (Guatemala)
234
+ /** Spanish (Guatemala) / 西班牙语(危地马拉) */
226
235
  AreaCode[AreaCode["es_GT"] = 4106] = "es_GT";
227
- // Spanish (Honduras)
236
+ /** Spanish (Honduras) / 西班牙语(洪都拉斯) */
228
237
  AreaCode[AreaCode["es_HN"] = 18442] = "es_HN";
229
- // Spanish (Mexico)
238
+ /** Spanish (Mexico) / 西班牙语(墨西哥) */
230
239
  AreaCode[AreaCode["es_MX"] = 2058] = "es_MX";
231
- // Spanish (Nicaragua)
240
+ /** Spanish (Nicaragua) / 西班牙语(尼加拉瓜) */
232
241
  AreaCode[AreaCode["es_NI"] = 19466] = "es_NI";
233
- // Spanish (Panama)
242
+ /** Spanish (Panama) / 西班牙语(巴拿马) */
234
243
  AreaCode[AreaCode["es_PA"] = 6154] = "es_PA";
235
- // Spanish (Paraguay)
244
+ /** Spanish (Paraguay) / 西班牙语(巴拉圭) */
236
245
  AreaCode[AreaCode["es_PY"] = 15370] = "es_PY";
237
- // Spanish (Peru)
246
+ /** Spanish (Peru) / 西班牙语(秘鲁) */
238
247
  AreaCode[AreaCode["es_PE"] = 10250] = "es_PE";
239
- // Spanish (Puerto Rico)
248
+ /** Spanish (Puerto Rico) / 西班牙语(波多黎各) */
240
249
  AreaCode[AreaCode["es_PR"] = 20490] = "es_PR";
241
- // Spanish (Spain Traditional)
250
+ /** Spanish (Spain, Traditional Sort) / 西班牙语(西班牙,传统排序) */
242
251
  AreaCode[AreaCode["es_ES"] = 1034] = "es_ES";
243
- // Spanish (Uruguay)
252
+ /** Spanish (Uruguay) / 西班牙语(乌拉圭) */
244
253
  AreaCode[AreaCode["es_UY"] = 14346] = "es_UY";
245
- // Spanish (Venezuela)
254
+ /** Spanish (Venezuela) / 西班牙语(委内瑞拉) */
246
255
  AreaCode[AreaCode["es_VE"] = 8202] = "es_VE";
247
- // Swahili (Kenya)
256
+ /** Swahili (Kenya) / 斯瓦希里语(肯尼亚) */
248
257
  AreaCode[AreaCode["sw_KE"] = 1089] = "sw_KE";
249
- // Swedish (Finland)
258
+ /** Swedish (Finland) / 瑞典语(芬兰) */
250
259
  AreaCode[AreaCode["sv_FI"] = 2077] = "sv_FI";
251
- // Swedish (Sweden)
260
+ /** Swedish (Sweden) / 瑞典语(瑞典) */
252
261
  AreaCode[AreaCode["sv_SE"] = 1053] = "sv_SE";
253
- // Tamil (India)
262
+ /** Tamil (India) / 泰米尔语(印度) */
254
263
  AreaCode[AreaCode["ta_IN"] = 1097] = "ta_IN";
255
- // Tatar (Russia)
264
+ /** Tatar (Russia) / 鞑靼语(俄罗斯) */
256
265
  AreaCode[AreaCode["tt_RU"] = 1092] = "tt_RU";
257
- // Telugu (India)
266
+ /** Telugu (India) / 泰卢固语(印度) */
258
267
  AreaCode[AreaCode["te_IN"] = 1098] = "te_IN";
259
- // Thai (Thailand)
268
+ /** Thai (Thailand) / 泰语(泰国) */
260
269
  AreaCode[AreaCode["th_TH"] = 1054] = "th_TH";
261
- // Turkish (Turkey)
270
+ /** Turkish (Turkey) / 土耳其语(土耳其) */
262
271
  AreaCode[AreaCode["tr_TR"] = 1055] = "tr_TR";
263
- // Uzbek (Uzbekistan - Cyrillics)
272
+ /** Uzbek — Cyrillic script (Uzbekistan) / 乌兹别克语——西里尔字母(乌兹别克斯坦) */
264
273
  AreaCode[AreaCode["uz_UZ_Cyrl"] = 2115] = "uz_UZ_Cyrl";
265
- // Uzbek (Uzbekistan - Latin)
274
+ /** Uzbek — Latin script (Uzbekistan) / 乌兹别克语——拉丁字母(乌兹别克斯坦) */
266
275
  AreaCode[AreaCode["uz_UZ_Latn"] = 1091] = "uz_UZ_Latn";
267
- // Vietnamese (Vietnam)
276
+ /** Vietnamese (Vietnam) / 越南语(越南) */
268
277
  AreaCode[AreaCode["vi_VN"] = 1066] = "vi_VN";
269
278
  })(AreaCode = exports.AreaCode || (exports.AreaCode = {}));
@@ -2,15 +2,29 @@
2
2
  /**@format */
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.Exception = void 0;
5
- /** Exception base class */
5
+ /**
6
+ * Base exception class for all aitianyu custom errors.
7
+ * Extends the built-in Error class and provides a standardized toString output.
8
+ *
9
+ * aitianyu 所有自定义异常的基类。
10
+ * 继承自内置 Error 类,提供标准化的 toString 输出。
11
+ */
6
12
  class Exception extends Error {
13
+ /**
14
+ * Create a new Exception instance.
15
+ * 创建一个新的 Exception 实例。
16
+ *
17
+ * @param msg optional error message / 可选的错误信息
18
+ * @param options optional error options / 可选的错误选项
19
+ */
7
20
  constructor(msg, options) {
8
21
  super(msg, options);
9
22
  }
10
23
  /**
11
- * Get a string of the Exception object
24
+ * Get the error message string of this Exception.
25
+ * 获取当前异常的错误信息字符串。
12
26
  *
13
- * @returns return an error message
27
+ * @returns the error message / 错误信息
14
28
  */
15
29
  toString() {
16
30
  return this.message;
@@ -2,19 +2,25 @@
2
2
  /**@format */
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.LogLevel = void 0;
5
- /** Tianyu Log Level */
5
+ /**
6
+ * Tianyu Log Level Enum.
7
+ * Defines the severity levels for log messages.
8
+ *
9
+ * Tianyu 日志级别枚举。
10
+ * 定义日志消息的严重程度级别。
11
+ */
6
12
  var LogLevel;
7
13
  (function (LogLevel) {
8
- /** Debug mode log */
14
+ /** Debug level for development/diagnostic messages. / 调试级别——用于开发或诊断信息。 */
9
15
  LogLevel[LogLevel["DEBUG"] = 0] = "DEBUG";
10
- /** error msg */
16
+ /** Error level — for recoverable error messages. / 错误级别——用于可恢复的错误信息。 */
11
17
  LogLevel[LogLevel["ERROR"] = 1] = "ERROR";
12
- /** fatal error msg */
18
+ /** Fatal level for critical, unrecoverable errors. / 致命级别——用于严重且无法恢复的错误。 */
13
19
  LogLevel[LogLevel["FATAL"] = 2] = "FATAL";
14
- /** info log */
20
+ /** Info level — for general informational messages. / 信息级别——用于一般性通知信息。 */
15
21
  LogLevel[LogLevel["INFO"] = 3] = "INFO";
16
- /** warning log */
22
+ /** Warning level — for potentially problematic situations. / 警告级别——用于潜在问题的提示信息。 */
17
23
  LogLevel[LogLevel["WARNING"] = 4] = "WARNING";
18
- /** default log */
24
+ /** Default log level — for plain output with no special classification. / 默认日志级别——无特殊分类的普通输出。 */
19
25
  LogLevel[LogLevel["LOG"] = 5] = "LOG";
20
26
  })(LogLevel = exports.LogLevel || (exports.LogLevel = {}));
@@ -2,21 +2,32 @@
2
2
  /**@format */
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.PathBase = void 0;
5
- /** Path base class */
5
+ /**
6
+ * Abstract base class for path representations.
7
+ * Stores an ordered list of directory segments and provides path manipulation utilities.
8
+ * Implements IComparable so instances can be used as TMap keys.
9
+ *
10
+ * 路径表示的抽象基类。
11
+ * 以有序列表存储目录段,并提供路径操作工具方法。
12
+ * 实现 IComparable 接口,使实例可用作 TMap 的键。
13
+ */
6
14
  class PathBase {
15
+ /** Internal array of directory segment strings. / 内部存储目录段字符串的数组。 */
7
16
  _dirs;
8
17
  /**
9
- * Create a Path instance by specified dirs
18
+ * Create a PathBase instance from an optional array of directory segments.
19
+ * 通过可选的目录段数组创建 PathBase 实例。
10
20
  *
11
- * @param dirs the specified directories
21
+ * @param dirs the directory segments to initialize with / 用于初始化的目录段数组
12
22
  */
13
23
  constructor(dirs) {
14
24
  this._dirs = (dirs && [...dirs]) || [];
15
25
  }
16
26
  /**
17
- * Convert the path instance to string
27
+ * Convert the path to a forward-slash-separated string.
28
+ * 将路径转换为以正斜杠分隔的字符串。
18
29
  *
19
- * @returns return the fromatted string
30
+ * @returns the formatted path string, or "" if empty / 格式化后的路径字符串,为空时返回 ""
20
31
  */
21
32
  toString() {
22
33
  if (0 === this._dirs.length) {
@@ -25,9 +36,10 @@ class PathBase {
25
36
  return this._dirs.join("/");
26
37
  }
27
38
  /**
28
- * Iterator of path directories
39
+ * Return an iterator over the directory segments in order.
40
+ * 按顺序返回目录段的迭代器。
29
41
  *
30
- * @returns return an iterator
42
+ * @returns an iterator object / 迭代器对象
31
43
  */
32
44
  [Symbol.iterator]() {
33
45
  let index = 0;
@@ -43,64 +55,72 @@ class PathBase {
43
55
  };
44
56
  }
45
57
  /**
46
- * Get a directories array deep copy
58
+ * Get a shallow copy of the internal directory segments array.
59
+ * 获取内部目录段数组的浅拷贝。
47
60
  *
48
- * @returns return directories
61
+ * @returns a copy of the directories array / 目录数组的副本
49
62
  */
50
63
  getDirs() {
51
64
  return this._dirs.concat();
52
65
  }
53
66
  /**
54
- * Get a number that indicates the directories count
67
+ * Get the number of directory segments in this path.
68
+ * 获取当前路径中目录段的数量。
55
69
  *
56
- * @returns return the directories count
70
+ * @returns the segment count / 目录段数量
57
71
  */
58
72
  length() {
59
73
  return this._dirs.length;
60
74
  }
61
75
  /**
62
- * Append a new directory to the end of path
76
+ * Append a new directory segment to the end of the path.
77
+ * 在路径末尾追加一个新的目录段。
63
78
  *
64
- * @param dir the new directory name
65
- * @returns return the new directories count
79
+ * @param dir the directory name to append / 要追加的目录名
80
+ * @returns the new total segment count / 新的目录段总数
66
81
  */
67
82
  append(dir) {
68
83
  return this._dirs.push(dir);
69
84
  }
70
85
  /**
71
- * Clean all the pathes
86
+ * Remove all directory segments, resetting the path to empty.
87
+ * 清除所有目录段,将路径重置为空。
72
88
  */
73
89
  clear() {
74
90
  this._dirs = [];
75
91
  }
76
92
  /**
77
- * Remove the end directory of the path instance and return it
93
+ * Remove and return the last directory segment.
94
+ * 移除并返回最后一个目录段。
78
95
  *
79
- * @returns return the end of directory
96
+ * @returns the last directory segment, or undefined if empty / 最后一个目录段,为空时返回 undefined
80
97
  */
81
98
  pop() {
82
99
  return this._dirs.pop();
83
100
  }
84
101
  /**
85
- * Remove the first directory of the path instance and return it
102
+ * Remove and return the first directory segment.
103
+ * 移除并返回第一个目录段。
86
104
  *
87
- * @returns return the first directory
105
+ * @returns the first directory segment, or undefined if empty / 第一个目录段,为空时返回 undefined
88
106
  */
89
107
  shift() {
90
108
  return this._dirs.shift();
91
109
  }
92
110
  /**
93
- * Convert the path instance to string for object comparing
111
+ * IComparable implementation returns the string form for object comparison.
112
+ * IComparable 实现——返回用于对象比较的字符串形式。
94
113
  *
95
- * @returns return the comparable string
114
+ * @returns the comparable string / 可比较字符串
96
115
  */
97
116
  getString() {
98
117
  return this.toString();
99
118
  }
100
119
  /**
101
- * Get the hashcode of current path
120
+ * IComparable implementation — returns 0 as the hash code for this path.
121
+ * IComparable 实现——返回 0 作为此路径的哈希码。
102
122
  *
103
- * @returns always return 0
123
+ * @returns always 0 / 始终返回 0
104
124
  */
105
125
  getHashCode() {
106
126
  return 0;
@@ -2,9 +2,14 @@
2
2
  /**@format */
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.EncryptOption = void 0;
5
- /** Encrypt Option Type */
5
+ /**
6
+ * Encryption operation direction.
7
+ * 加密操作方向枚举。
8
+ */
6
9
  var EncryptOption;
7
10
  (function (EncryptOption) {
11
+ /** Encryption direction — encode plaintext into ciphertext. / 加密方向——将明文编码为密文。 */
8
12
  EncryptOption[EncryptOption["Encryption"] = 0] = "Encryption";
13
+ /** Decryption direction — decode ciphertext back to plaintext. / 解密方向——将密文还原为明文。 */
9
14
  EncryptOption[EncryptOption["Decryption"] = 1] = "Decryption";
10
15
  })(EncryptOption = exports.EncryptOption || (exports.EncryptOption = {}));