You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/registry.md
+25-6
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,6 @@ sidebar_label: registry()
7
7
8
8
# registry()
9
9
10
-
11
10
Allows custom registries to be plugged into the task system, which can provide shared tasks or augmented functionality.
12
11
13
12
**Note:** Only tasks registered with `task()` will be provided to the custom registry. The task functions passed directly to `series()` or `parallel()` will not be provided - if you need to customize the registry behavior, compose tasks with string references.
@@ -50,14 +49,34 @@ If a `registryInstance` is passed, nothing will be returned. If no arguments are
50
49
51
50
### Errors
52
51
53
-
When a constructor (instead of an instance) is passed as `registryInstance`, throws an error with the message, "Custom registries must be instantiated, but it looks like you passed a constructor".
52
+
#### Incorrect Parameter
53
+
54
+
When a constructor (instead of an instance) is passed as `registryInstance`, throws an error with the message:
55
+
56
+
> Custom registries must be instantiated, but it looks like you passed a constructor.
57
+
58
+
#### Missing get Method
59
+
60
+
When a registry without a `get` method is passed as `registryInstance`, throws an error with the message:
61
+
62
+
> Custom registry must have `get` function.
63
+
64
+
#### Missing set Method
65
+
66
+
When a registry without a `set` method is passed as `registryInstance`, throws an error with the message:
67
+
68
+
> Custom registry must have `set` function.
69
+
70
+
#### Missing init Method
71
+
72
+
When a registry without an `init` method is passed as `registryInstance`, throws an error with the message:
54
73
55
-
When a registry without a `get` method is passed as `registryInstance`, throws an error with the message, "Custom registry must have `get` function".
74
+
> Custom registry must have `init` function"
56
75
57
-
When a registry without a `set` method is passed as `registryInstance`, throws an error with the message, "Custom registry must have `set` function".
76
+
#### Missing tasks Method
58
77
59
-
When a registry without an `init` method is passed as `registryInstance`, throws an error with the message, "Custom registry must have `init` function"
78
+
When a registry without a `tasks` method is passed as `registryInstance`, throws an error with the message:
60
79
61
-
When a registry without a `tasks` method is passed as `registryInstance`, throws an error with the message, "Custom registry must have `tasks` function".
0 commit comments