@@ -3,8 +3,10 @@ import * as path from 'path';
3
3
4
4
/**
5
5
* 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 }
8
10
*/
9
11
export function log ( message : string , isDebugEnabled : boolean ) : void {
10
12
if ( ! isDebugEnabled ) return ;
@@ -13,12 +15,14 @@ export function log(message: string, isDebugEnabled: boolean): void {
13
15
14
16
/**
15
17
* 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
18
24
*/
19
25
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
22
26
const CLASS_NAME_REGEX = / ^ - ? [ _ a - z A - Z ] + [ _ a - z A - Z 0 - 9 - ] * $ / ;
23
27
return CLASS_NAME_REGEX . test ( className ) ;
24
28
}
@@ -30,9 +34,10 @@ interface FileInfo {
30
34
31
35
/**
32
36
* 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
36
41
*/
37
42
export function findFiles ( dir : string , pattern : RegExp ) : FileInfo [ ] {
38
43
const files : FileInfo [ ] = [ ] ;
0 commit comments