mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-10 20:52:42 +01:00
🐛 fix util types
This commit is contained in:
parent
88853f57df
commit
c1eed47439
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user