GramIO API Reference / @gramio/autoload/dist / AutoloadOptions
Interface: AutoloadOptions
Defined in: autoload/index.d.ts:13
Options for autoload plugin with options for Options | fdir and PicomatchOptions | picomatch
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
failGlob? | boolean | Throws an error if no matches are found. Default true | autoload/index.d.ts:36 |
fdir? | Options | Configure fdir options | autoload/index.d.ts:15 |
import? | SoftString<"default"> | (file) => string | import a specific export from a file Example `import: (file) => Object.keys(file).at(0) | |
onFinish? | (paths) => unknown | The hook that is called after loading all files | autoload/index.d.ts:50 |
onLoad? | (path) => unknown | The hook that is called when loading a file | autoload/index.d.ts:48 |
path? | string | The path to the folder Default "./commands" | autoload/index.d.ts:46 |
patterns? | string | string[] | Glob patterns Default "**/*.{ts,js,cjs,mjs}" | autoload/index.d.ts:31 |
picomatch? | PicomatchOptions | Configure picomatch options | autoload/index.d.ts:17 |
skipImportErrors? | boolean | Skip imports where needed export not defined Default false | autoload/index.d.ts:41 |