Skip to content

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

PropertyTypeDescriptionDefined in
failGlob?booleanThrows an error if no matches are found. Default trueautoload/index.d.ts:36
fdir?OptionsConfigure fdir optionsautoload/index.d.ts:15
import?SoftString<"default"> | (file) => stringimport a specific export from a file Example `import: (file) => Object.keys(file).at(0)
onFinish?(paths) => unknownThe hook that is called after loading all filesautoload/index.d.ts:50
onLoad?(path) => unknownThe hook that is called when loading a fileautoload/index.d.ts:48
path?stringThe 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?PicomatchOptionsConfigure picomatch optionsautoload/index.d.ts:17
skipImportErrors?booleanSkip imports where needed export not defined Default falseautoload/index.d.ts:41