Skip to content

Commit

Permalink
chore: fix jsdoc and typo (#1662)
Browse files Browse the repository at this point in the history
  • Loading branch information
那里好脏不可以 authored Nov 8, 2023
1 parent ec912a3 commit 5ba533f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ Fangdun Cai <fundon@users.noreply.github.com>
Felix Becker <felix.b@outlook.com>
Filip Skokan <panva.ip@gmail.com>
Francisco Presencia <franciscop@users.noreply.github.com>
Gao Sheng <gaosheng08@meituan.com>
George Chung <Gerhut@GMail.com>
Gilles De Mey <gilles.de.mey@gmail.com>
Grand <sungg12138@163.com>
Expand Down
4 changes: 2 additions & 2 deletions docs/koa-vs-express.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
## Does Koa replace Connect?

No, just a different take on similar functionality
now that generators allow us to write code with less
now that generators allow us to write code with fewer
callbacks. Connect is equally capable, and some may still prefer it,
it's up to what you prefer.

Expand All @@ -51,7 +51,7 @@
the entire application, so we thought it would be more appropriate
to create a new library.

## How is Koa different than Connect/Express?
## How is Koa different from Connect/Express?

### Promises-based control flow

Expand Down
4 changes: 2 additions & 2 deletions lib/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ module.exports = {
/**
* Return parsed Content-Length when present.
*
* @return {Number}
* @return {Number|void}
* @api public
*/

Expand Down Expand Up @@ -503,7 +503,7 @@ module.exports = {
/**
* Set accept object.
*
* @param {Object}
* @param {Object} obj
* @api private
*/

Expand Down
15 changes: 9 additions & 6 deletions lib/response.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,10 @@ module.exports = {
/**
* Set Content-Disposition header to "attachment" with optional `filename`.
*
* @param {String} filename
* @param {String} [filename]
* @param {object} [options]
* @param {string} [options.type=attachment]
* @param {string|boolean} [options.fallback=true]
* @api public
*/

Expand Down Expand Up @@ -328,7 +331,7 @@ module.exports = {
* this.response.lastModified = new Date();
* this.response.lastModified = '2013-09-13';
*
* @param {String|Date} type
* @param {String|Date} val
* @api public
*/

Expand Down Expand Up @@ -357,7 +360,7 @@ module.exports = {
* this.response.etag = '"md5hashsum"';
* this.response.etag = 'W/"123456789"';
*
* @param {String} etag
* @param {String} val
* @api public
*/

Expand Down Expand Up @@ -460,7 +463,7 @@ module.exports = {
* this.set({ Accept: 'text/plain', 'X-API-Key': 'tobi' });
*
* @param {String|Object|Array} field
* @param {String} val
* @param {*} val
* @api public
*/

Expand Down Expand Up @@ -490,7 +493,7 @@ module.exports = {
* ```
*
* @param {String} field
* @param {String|Array} val
* @param {*} val
* @api public
*/

Expand All @@ -509,7 +512,7 @@ module.exports = {
/**
* Remove header `field`.
*
* @param {String} name
* @param {String} field
* @api public
*/

Expand Down

0 comments on commit 5ba533f

Please sign in to comment.