Skip to content

Commit

Permalink
Add doc
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinddchen committed Feb 11, 2023
1 parent e9c9464 commit 8b7b6f7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docs/documentation/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ A plugin is an object that contains the following fields.
// and returns another function that wraps it. This
// wrapper can modify G before passing it down to
// the wrapped function. It is a good practice to
// undo the change at the end of the call.
fnWrap: (fn) => ({ G, ...rest }, ...args) => {
// undo the change at the end of the call.
// `fnType` gives the type of hook being wrapped.
fnWrap: (fn, fnType) => ({ G, ...rest }, ...args) => {
G = preprocess(G);
G = fn({ G, ...rest }, ...args);
G = postprocess(G);
Expand Down

0 comments on commit 8b7b6f7

Please sign in to comment.