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/src/orchid/resources/wiki/key-concepts.md
+42-1
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ To those new to this project, it might help to go over some keywords:
9
9
* Call - action taken by hook owner to invoke plugins
10
10
* Plugin - something that taps a hook
11
11
12
-
A **plugin** can **tap** into a **hook** to provide additional functionality
12
+
> A **plugin** can **tap** into a **hook** to provide additional functionality
13
13
14
14
### Hooks
15
15
@@ -22,6 +22,47 @@ The hooks library exposes a collection of different types of hooks that support
22
22
|**Bail**| Bail hooks allow exiting early with a return value. When any of the tapped function bails, the bail hook will stop executing the remaining ones |`PARALLEL`|
23
23
|**Loop**| When a plugin in a loop hook returns a non-undefined value the hook will restart from the first plugin. It will loop until all plugins return undefined. |`PARALLEL`|
24
24
25
+
### Untapping
26
+
27
+
Hooks that are tapped return a unique ID that can be used to `untap` from a hook, effectively removing that `tap` from the hook. For convenience, this ID can be specified when tapping the hook to easily override if the callback needs to be updated.
> With the register interceptors described below, calling `tap` is not guaranteed to actually tap the hook if the interceptor rejects it. In this case, the ID returned from `tap` will be `null`.
65
+
25
66
### Interceptors
26
67
27
68
Every hook provides support to register interceptors for different events:
0 commit comments