From 591d9d3d17c4c4bf9ffbb52e843cc096c14a7425 Mon Sep 17 00:00:00 2001
From: DARSAN <iamspdarsan@gmail.com>
Date: Thu, 21 Nov 2024 14:13:46 +0530
Subject: [PATCH] code quality improved

---
 bin/iconAssociator.ts   |  2 +-
 bin/rjs.ts              |  2 +-
 lib/browser/branding.ts |  2 +-
 lib/browser/pathlib.ts  | 12 ++++++------
 4 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/bin/iconAssociator.ts b/bin/iconAssociator.ts
index 3d60fe6..2778b27 100644
--- a/bin/iconAssociator.ts
+++ b/bin/iconAssociator.ts
@@ -73,7 +73,7 @@ export default function writeSettings(): Promise<void> {
 	});
 }
 
-function copyRichieJSIcon() {
+function copyRichieJSIcon(): void {
 	const userHome: string = (
 		process.platform === "win32" ?
 			join(process.env.HOMEDRIVE ?? "", process.env.HOMEPATH ?? "")
diff --git a/bin/rjs.ts b/bin/rjs.ts
index 78e4051..5b14115 100644
--- a/bin/rjs.ts
+++ b/bin/rjs.ts
@@ -12,7 +12,7 @@ function main(): Promise<void> {
 	const givenCommand: availableCommandsOP = process
 		.argv[2] as availableCommandsOP;
 
-	const unsupportedAlert = () => {
+	const unsupportedAlert = (): void => {
 		console.log(
 			`Unsupported command\nAvailable commands are\n${availableCommands}`,
 		);
diff --git a/lib/browser/branding.ts b/lib/browser/branding.ts
index f978774..71d1116 100644
--- a/lib/browser/branding.ts
+++ b/lib/browser/branding.ts
@@ -1,4 +1,4 @@
-export default function branding() {
+export default function branding(): void {
 	const asciiArt = `
   _______            _____         ______  
  |       \\          |     \\       /      \\ 
diff --git a/lib/browser/pathlib.ts b/lib/browser/pathlib.ts
index e3bf401..7b3007d 100644
--- a/lib/browser/pathlib.ts
+++ b/lib/browser/pathlib.ts
@@ -1,8 +1,8 @@
-export function dirname(filePath: string) {
+export function dirname(filePath: string): string {
 	return filePath.substring(0, filePath.lastIndexOf("/"));
 }
 
-export function basename(path: string, ext: string = "") {
+export function basename(path: string, ext: string = ""): string {
 	// Extract the base name of the path
 	const base: string = path.split("/").pop() ?? "";
 
@@ -14,7 +14,7 @@ export function basename(path: string, ext: string = "") {
 	return base;
 }
 
-export function join(...args: string[]) {
+export function join(...args: string[]): string {
 	// Normalize paths and remove leading/trailing slashes, if any
 	return args
 		.map((segment) =>
@@ -24,7 +24,7 @@ export function join(...args: string[]) {
 		.join("/");
 }
 
-export function relative(from: string, to: string) {
+export function relative(from: string, to: string): string {
 	// Normalize paths by splitting into segments
 	const fromParts = from.replace(/[/\\]+$/, "").split("/");
 	const toParts = to.replace(/[/\\]+$/, "").split("/");
@@ -48,7 +48,7 @@ export function relative(from: string, to: string) {
 	return relativePath || ".";
 }
 
-export function resolve(...paths: string[]) {
+export function resolve(...paths: string[]): string {
 	// Initialize an array to hold the resolved path segments
 	let resolvedPath: string[] = [];
 
@@ -67,6 +67,6 @@ export function resolve(...paths: string[]) {
 	return resolvedPath.join("/").replace(/\/+/g, "/");
 }
 
-export function cwd() {
+export function cwd(): string {
 	return document.baseURI;
 }