@jayfong/x-server 2.111.0 → 2.112.0
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.
|
@@ -258,6 +258,7 @@ class ApiGenerator {
|
|
|
258
258
|
const isIntersection = type.isIntersection();
|
|
259
259
|
const intersectionTypes = isIntersection && type.types || [];
|
|
260
260
|
const isDate = valueSymbolName === 'Date';
|
|
261
|
+
const isRegExp = valueSymbolName === 'RegExp';
|
|
261
262
|
const isBigIntLiteral = hasTypeFlag(_tsMorph.ts.TypeFlags.BigIntLiteral);
|
|
262
263
|
const isBigInt = hasTypeFlag(_tsMorph.ts.TypeFlags.BigInt) || isBigIntLiteral;
|
|
263
264
|
const isArray = valueSymbolName === 'Array' || valueSymbolName === 'ReadonlyArray';
|
|
@@ -266,7 +267,9 @@ class ApiGenerator {
|
|
|
266
267
|
// BigInt 类型视为字符串
|
|
267
268
|
isBigInt ||
|
|
268
269
|
// Date 类型视为字符串
|
|
269
|
-
isDate
|
|
270
|
+
isDate ||
|
|
271
|
+
// RegExp 类型视为字符串
|
|
272
|
+
isRegExp;
|
|
270
273
|
const isNumberLiteral = hasTypeFlag(_tsMorph.ts.TypeFlags.NumberLiteral);
|
|
271
274
|
const isNumber = hasTypeFlag(_tsMorph.ts.TypeFlags.Number) || isNumberLiteral;
|
|
272
275
|
const isBoolean = hasTypeFlag(_tsMorph.ts.TypeFlags.Boolean) || hasTypeFlag(_tsMorph.ts.TypeFlags.BooleanLiteral);
|
package/lib/cli/api_generator.js
CHANGED
|
@@ -253,6 +253,7 @@ export class ApiGenerator {
|
|
|
253
253
|
const isIntersection = type.isIntersection();
|
|
254
254
|
const intersectionTypes = isIntersection && type.types || [];
|
|
255
255
|
const isDate = valueSymbolName === 'Date';
|
|
256
|
+
const isRegExp = valueSymbolName === 'RegExp';
|
|
256
257
|
const isBigIntLiteral = hasTypeFlag(ts.TypeFlags.BigIntLiteral);
|
|
257
258
|
const isBigInt = hasTypeFlag(ts.TypeFlags.BigInt) || isBigIntLiteral;
|
|
258
259
|
const isArray = valueSymbolName === 'Array' || valueSymbolName === 'ReadonlyArray';
|
|
@@ -261,7 +262,9 @@ export class ApiGenerator {
|
|
|
261
262
|
// BigInt 类型视为字符串
|
|
262
263
|
isBigInt ||
|
|
263
264
|
// Date 类型视为字符串
|
|
264
|
-
isDate
|
|
265
|
+
isDate ||
|
|
266
|
+
// RegExp 类型视为字符串
|
|
267
|
+
isRegExp;
|
|
265
268
|
const isNumberLiteral = hasTypeFlag(ts.TypeFlags.NumberLiteral);
|
|
266
269
|
const isNumber = hasTypeFlag(ts.TypeFlags.Number) || isNumberLiteral;
|
|
267
270
|
const isBoolean = hasTypeFlag(ts.TypeFlags.Boolean) || hasTypeFlag(ts.TypeFlags.BooleanLiteral);
|