mirror of
https://github.com/spacebarchat/server.git
synced 2026-05-24 19:05:29 +00:00
🐛 fix util types
This commit is contained in:
@@ -41,7 +41,7 @@ class LongSchema extends mongoose.SchemaType {
|
||||
if (type === "handle" || init == false) return val;
|
||||
return BigInt(val.toString());
|
||||
}
|
||||
if (val instanceof Number || "number" == typeof val) return BigInt(val);
|
||||
if (val instanceof Number || "number" == typeof val) return BigInt(val as number);
|
||||
if (!Array.isArray(val) && val.toString) return BigInt(val.toString());
|
||||
|
||||
//@ts-ignore
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
export default function toBigInt(string: String): BigInt {
|
||||
export default function toBigInt(string: string): bigint {
|
||||
return BigInt(string);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user