-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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(middleware): use async #1703
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1703 +/- ##
=======================================
Coverage 99.58% 99.58%
=======================================
Files 29 29
Lines 717 717
=======================================
Hits 714 714
Misses 3 3 Continue to review full report at Codecov.
|
docs/source/en/basics/middleware.md
Outdated
- async function: `async (ctx, next) => {}` | ||
- generator function: `function* (next) {}` |
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.
generator function 的用法去掉吧
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.
就这一句还好吧,因为上面还有个 框架兼容 Koa 1.x 和 2.x 支持的所有形式的中间件,包括:
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.
别加了,因为这个很影响性能,而且 koa 1.x 估计以后都不会怎么维护了
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.
感觉上面也可以不去区分 koa 1.x 和 koa 2.x 了,直接写兼容 koa 的中间件就好了
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.
是干掉还是注明一个 1.x 不推荐就好了?
现在 koa 社区应该还有很多存量的 koa1 中间件吧?
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.
干掉吧
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.
干掉了
70ea0b6
to
5b3a98c
Compare
docs(middleware): use async (#1703)
Checklist
npm test
passesAffected core subsystem(s)
Description of change