@types/undertaker-registry
- Version 1.0.4
- Published
- 5.87 kB
- No dependencies
- MIT license
Install
npm i @types/undertaker-registry
yarn add @types/undertaker-registry
pnpm add @types/undertaker-registry
Overview
TypeScript definitions for undertaker-registry
Index
Classes
class UndertakerRegistry
class UndertakerRegistry {}
method get
get: <TTaskFunction>(taskName: string) => TTaskFunction;
Returns the task with that name or undefined if no task is registered with that name. Useful for custom task storage. Custom registries can override this method when inheriting from this default registry.
Parameter taskName
Name of task.
method init
init: (taker: any) => void;
No-op method that receives the undertaker instance. Useful to set pre-defined tasks using the undertaker.task(taskName, fn) method. Custom registries can override this method when inheriting from this default registry.
Parameter taker
Instance of undertaker.
method set
set: <TTaskFunction>(taskName: string, fn: TTaskFunction) => TTaskFunction;
Adds a task to the registry. If set modifies a task, it should return the new task so Undertaker can properly maintain metadata for the task. Useful for adding custom behavior to every task as it is registered in the system. Custom registries can override this method when inheriting from this default registry.
Parameter taskName
Name of task.
Parameter fn
Task function.
method tasks
tasks: () => { [taskName: string]: (...args: any[]) => any };
Returns an object listing all tasks in the registry. Necessary to override if the get method is overridden for custom task storage. Custom registries can override this when when inheriting from this default registry.
Package Files (1)
Dependencies (0)
No dependencies.
Dev Dependencies (0)
No dev dependencies.
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@types/undertaker-registry
.
- Markdown[![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@types/undertaker-registry)
- HTML<a href="https://www.jsdocs.io/package/@types/undertaker-registry"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3687 ms. - Missing or incorrect documentation? Open an issue for this package.