refactor: typescript support

This commit is contained in:
liyasthomas
2021-09-15 17:30:04 +05:30
parent 96bcbc80f8
commit 4e8a4e8914
21 changed files with 98 additions and 176 deletions

12
helpers/utils/string.ts Normal file
View File

@@ -0,0 +1,12 @@
const sourceEmojis = {
// Source used for info messages.
info: "\t [INFO]:\t",
// Source used for client to server messages.
client: "\t⬅ [SENT]:\t",
// Source used for server to client messages.
server: "\t➡ [RECEIVED]:\t",
}
export function getSourcePrefix(source: keyof typeof sourceEmojis) {
return sourceEmojis[source]
}