-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add JSDoc to and list out all available builtin middleware functions in the docs #2136
Conversation
…tions in the docs.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2136 +/- ##
=======================================
Coverage 82.03% 82.03%
=======================================
Files 18 18
Lines 1536 1536
Branches 442 442
=======================================
Hits 1260 1260
Misses 178 178
Partials 98 98 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the work! I think the document could be clearer about which middleware is typically used for listener middleware. Technically, you can pass any middleware to any listener, but some patterns are just meaningless.
@@ -288,6 +288,11 @@ export function matchEventType(pattern: EventTypePattern): Middleware<SlackEvent | |||
}; | |||
} | |||
|
|||
// TODO: breaking change: why does this method have to be invoked as a function with no args, while other similar | |||
// method like the `only*` ones do not require that? should make this consistent. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we rename this to onlyNonSelfEvents or something like that, that sounds good to me too. When we make such a change, perhaps having an alias "ignoreSelf" for backward compatibility for a while would be a good way to go.
@seratch I've split the built-in middleware list into global vs. listener lists; let me know what you think 🙇 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update! Looks goo to me 👍
Just adding some JSdocs to the available builtin middleware docs. Also added a list of them to the actual docs site.
This fixes #242 .