Tickets! and a lot of bug fixes
diff --git a/src/utils/calculate.ts b/src/utils/calculate.ts
index 98d82c3..0bd5a9f 100644
--- a/src/utils/calculate.ts
+++ b/src/utils/calculate.ts
@@ -23,7 +23,7 @@
const tickets = ["support", "report", "question", "issue", "suggestion", "other"];
-const toHexInteger = (permissions: string[], array?: string[]) => {
+const toHexInteger = (permissions: string[], array?: string[]): string => {
if (!array) {
array = logs;
}
@@ -35,18 +35,18 @@
return int.toString(16);
};
-const toHexArray = (permissionsHex: string, array?: string[]) => {
+const toHexArray = (permissionsHex: string, array?: string[]): string[] => {
if (!array) {
array = logs;
}
- const permissions = [];
+ const permissions: string[] = [];
const int = BigInt("0x" + permissionsHex)
.toString(2)
.split("")
.reverse();
for (const index in int) {
if (int[index] === "1" && array.length > parseInt(index)) {
- permissions.push(array[index]);
+ permissions.push(array[index]!);
}
}
return permissions;