Merge pull request #280 from ZynerOrg/deepsource-fix-9e202dea
Adds the appropriate return type for the method or function
This commit is contained in:
commit
523d45eca4
2 changed files with 2 additions and 2 deletions
|
@ -4,7 +4,7 @@ import { secretKey, algorithm } from "@config/encryption";
|
|||
|
||||
const iv = crypto.randomBytes(16);
|
||||
|
||||
const encrypt = (text: any) => {
|
||||
const encrypt = (text: any): { iv: error; content: error } => {
|
||||
const cipher = crypto.createCipheriv(algorithm, secretKey, iv);
|
||||
|
||||
const encrypted = Buffer.concat([cipher.update(text), cipher.final()]);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import logger from "@root/logger";
|
||||
|
||||
export default (count: number, noun: string, suffix?: string) => {
|
||||
export default (count: number, noun: string, suffix?: string): string => {
|
||||
const result = `${count} ${noun}${count !== 1 ? suffix || "s" : ""}`;
|
||||
logger?.verbose(`Pluralized ${count} to ${result}`);
|
||||
return result;
|
||||
|
|
Loading…
Add table
Reference in a new issue