1 | # Installation
|
2 | > `npm install --save @types/undertaker-registry`
|
3 |
|
4 | # Summary
|
5 | This package contains type definitions for undertaker-registry (https://github.com/gulpjs/undertaker-registry).
|
6 |
|
7 | # Details
|
8 | Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/undertaker-registry.
|
9 | ## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/undertaker-registry/index.d.ts)
|
10 | ````ts
|
11 | declare class UndertakerRegistry {
|
12 | /**
|
13 | * Returns the task with that name or undefined if no task is registered with that name.
|
14 | * Useful for custom task storage.
|
15 | * Custom registries can override this method when inheriting from this default registry.
|
16 | * @param taskName - Name of task.
|
17 | */
|
18 | get<TTaskFunction>(taskName: string): TTaskFunction;
|
19 |
|
20 | /**
|
21 | * No-op method that receives the undertaker instance.
|
22 | * Useful to set pre-defined tasks using the undertaker.task(taskName, fn) method.
|
23 | * Custom registries can override this method when inheriting from this default registry.
|
24 | * @param taker - Instance of undertaker.
|
25 | */
|
26 | init(taker: any): void;
|
27 |
|
28 | /**
|
29 | * Adds a task to the registry.
|
30 | * If set modifies a task, it should return the new task so Undertaker can properly maintain metadata for the task.
|
31 | * Useful for adding custom behavior to every task as it is registered in the system.
|
32 | * Custom registries can override this method when inheriting from this default registry.
|
33 | * @param taskName - Name of task.
|
34 | * @param fn - Task function.
|
35 | */
|
36 | set<TTaskFunction>(taskName: string, fn: TTaskFunction): TTaskFunction;
|
37 |
|
38 | /**
|
39 | * Returns an object listing all tasks in the registry.
|
40 | * Necessary to override if the get method is overridden for custom task storage.
|
41 | * Custom registries can override this when when inheriting from this default registry.
|
42 | */
|
43 | tasks(): { [taskName: string]: (...args: any[]) => any };
|
44 | }
|
45 |
|
46 | declare namespace UndertakerRegistry {}
|
47 |
|
48 | export = UndertakerRegistry;
|
49 |
|
50 | ````
|
51 |
|
52 | ### Additional Details
|
53 | * Last updated: Tue, 07 Nov 2023 15:11:36 GMT
|
54 | * Dependencies: none
|
55 |
|
56 | # Credits
|
57 | These definitions were written by [Giedrius Grabauskas](https://github.com/GiedriusGrabauskas).
|
58 |
|
\ | No newline at end of file |