Skip to content

Commit

Permalink
docs: add d.ts for bodyparser (#2548)
Browse files Browse the repository at this point in the history
  • Loading branch information
wangtao0101 authored and dead-horse committed May 16, 2018
1 parent e7696a7 commit 16a6123
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ declare module 'egg' {
* @property {Number} queryString.arrayLimit - from item array length limit, default 100
* @property {Number} queryString.depth - json value deep lenght, default 5
* @property {Number} queryString.parameterLimit - paramter number limit ,default 1000
* @property {string[]} enableTypes - parser will only parse when request type hits enableTypes, default is ['json', 'form']
* @property {any} extendTypes - support extend types
*/
bodyParser: {
enable: boolean;
Expand All @@ -235,6 +237,12 @@ declare module 'egg' {
depth: number;
parameterLimit: number;
};
enableTypes: string[];
extendTypes: {
json?: string[];
form?: string[];
text?: string[];
};
};

/**
Expand Down

0 comments on commit 16a6123

Please sign in to comment.