summary refs log tree commit diff
diff options
context:
space:
mode:
authorMathMan05 <mathmanrm@gmail.com>2026-02-23 16:17:29 -0600
committerMathMan05 <mathmanrm@gmail.com>2026-02-23 16:17:29 -0600
commite37c595dbb2100f3615c7d697a2d5d2636080710 (patch)
treea972c8363d493b02e9d33df0f9503308d044a099
parentfix up searching (diff)
downloadserver-ts-e37c595dbb2100f3615c7d697a2d5d2636080710.tar.xz
why didn't anyone do this
-rw-r--r--src/util/util/Snowflake.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/util/Snowflake.ts b/src/util/util/Snowflake.ts

index ee6036bc..8be2dbec 100644 --- a/src/util/util/Snowflake.ts +++ b/src/util/util/Snowflake.ts
@@ -39,7 +39,7 @@ export class Snowflake { * @returns {string} * @private */ - static idToBinary(num) { + private static idToBinary(num: string): string { let bin = ""; let high = parseInt(num.slice(0, -10)) || 0; let low = parseInt(num.slice(-10)); @@ -60,7 +60,7 @@ export class Snowflake { * @returns {Snowflake} * @private */ - static binaryToID(num) { + private static binaryToID(num: string): string { let dec = ""; while (num.length > 50) { @@ -112,7 +112,7 @@ export class Snowflake { * @param {Snowflake} snowflake Snowflake to deconstruct * @returns {DeconstructedSnowflake} Deconstructed snowflake */ - static deconstruct(snowflake) { + static deconstruct(snowflake: string) { const BINARY = Snowflake.idToBinary(snowflake).toString(2).padStart(64, "0"); const res = { timestamp: parseInt(BINARY.substring(0, 42), 2) + Snowflake.EPOCH,