Skip to main content

GetModulesFromFolderOptions

@quik/core


@quik/core / GetModulesFromFolderOptions

Type Alias: GetModulesFromFolderOptions<T>

GetModulesFromFolderOptions<T> = object

Defined in: utils/FileSystem.ts:107

Options for loading modules from a folder.

Type Parameters

T

T

The type of class instances expected from each module.

Properties

basePath?

optional basePath?: string

Defined in: utils/FileSystem.ts:109

The root path against which module paths are resolved. Defaults to process.cwd().


folder

folder: string

Defined in: utils/FileSystem.ts:108

The path to the folder containing the modules to load.


loader?

optional loader?: string

Defined in: utils/FileSystem.ts:110

An optional identifier used in logging to describe what is being loaded.


register?

optional register?: (...contents) => void

Defined in: utils/FileSystem.ts:111

A callback that receives the loaded module constructors.

Parameters

contents

...Constructor<T>[]

Returns

void