BaseHandler
Represents a base handler class.
Signature
export declare class BaseHandlerProperties
2Methods
4Properties
Methods
constructorConstructorconstructor(logger: Logger);protected getFiles(dir: string): Promise<string[]>;Recursively retrieves all files in a directory.
Parameters
dir- The directory path.
Returns
A Promise that resolves to an array of file paths.
protected loadFiles<T extends NonNullable<unknown>>(paths: string[]): Promise<T[]>;Loads files from given paths.
Parameters
paths- The paths of the files to load.
Returns
A Promise that resolves to an array of loaded files.
protected loadFilesK<T>(paths: string[]): Promise<{ name: string; file: T; path: string;}[]>;Loads files from given paths along with additional information.
Parameters
paths- The paths of the files to load.
Returns
A Promise that resolves to an array of objects containing name, file, and path.