Skip to content

Commit 5f2deed

Browse files
committed
Update utils jsdoc
1 parent b2262e0 commit 5f2deed

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

src/utils.ts

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ import * as path from 'path';
33

44
/**
55
* Logs a message if debugging is enabled
6-
* @param message - The message to log
7-
* @param isDebugEnabled - Whether debugging is enabled
6+
*
7+
* @param {string} message - The message to log
8+
* @param {boolean} isDebugEnabled - Whether debugging is enabled
9+
* @returns {void}
810
*/
911
export function log(message: string, isDebugEnabled: boolean): void {
1012
if (!isDebugEnabled) return;
@@ -13,12 +15,14 @@ export function log(message: string, isDebugEnabled: boolean): void {
1315

1416
/**
1517
* Checks if a class name is valid
16-
* @param className - The class name to check
17-
* @returns True if the class name is valid, false otherwise
18+
*
19+
* Class names must start with a letter, underscore, or hyphen
20+
* and can be followed by letters, numbers, underscores, or hyphens
21+
*
22+
* @param {string} className - The class name to check
23+
* @returns {boolean} True if the class name is valid, false otherwise
1824
*/
1925
export function isValidClassName(className: string): boolean {
20-
// Class names must start with a letter, underscore, or hyphen
21-
// and can be followed by letters, numbers, underscores, or hyphens
2226
const CLASS_NAME_REGEX = /^-?[_a-zA-Z]+[_a-zA-Z0-9-]*$/;
2327
return CLASS_NAME_REGEX.test(className);
2428
}
@@ -30,9 +34,10 @@ interface FileInfo {
3034

3135
/**
3236
* Recursively finds files in a directory that match a given pattern
33-
* @param dir - The directory to search in
34-
* @param pattern - The pattern to match file names against
35-
* @returns An array of objects containing file names and paths
37+
*
38+
* @param {string} dir - The directory to search in
39+
* @param {RegExp} pattern - The regular expression pattern to match file names against
40+
* @returns {FileInfo[]} An array of FileInfo objects containing file names and paths
3641
*/
3742
export function findFiles(dir: string, pattern: RegExp): FileInfo[] {
3843
const files: FileInfo[] = [];

0 commit comments

Comments
 (0)