1
0
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:
Flam3rboy 2021-08-13 20:54:16 +02:00
parent 88853f57df
commit c1eed47439
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -1,3 +1,3 @@
export default function toBigInt(string: String): BigInt {
export default function toBigInt(string: string): bigint {
return BigInt(string);
}