F

findByName

Finds a module by the name of its default export. Lazy unless { lazy: false } is passed: the search runs on first access.

function findByName<K extends MetroLookupFirst<MetroModuleName>, T extends MetroLookupArgs<string>>(first: K, ...rest: T): MetroFunctionSignatureOrArray<[K, ...T[]], string>

Finds a module by the name of its default export. Lazy unless { lazy: false } is passed: the search runs on first access.

Parameters

NameTypeDescription
firstK

The name to search for.

...restT

Options, or further bulk items.

Returns

MetroFunctionSignatureOrArray<[K, ...T[]], string>

The matched function (or matches, for a bulk/all search), typed from Discord's modules when the name is known.

function findByName<T extends MetroLookupArgs<string>>(...args: T): MetroFunctionSignatureOrArray<T, string>

Finds a module by the name of its default export. Lazy unless { lazy: false } is passed: the search runs on first access.

Parameters

NameTypeDescription
...argsT

Returns

MetroFunctionSignatureOrArray<T, string>

The matched function (or matches, for a bulk/all search), typed from Discord's modules when the name is known.