Skip to content

Commit

Permalink
fix(nano-server): type
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Feb 10, 2023
1 parent 38b680e commit 2586061
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/nano-server/src/nano-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ export class AlwatrConnection {
* const bodyData = await connection.requireJsonBody();
* ```
*/
async requireJsonBody<T>(): Promise<T> {
async requireJsonBody<T extends StringifyableRecord>(): Promise<T> {
// if request content type is json
if (this.incomingMessage.headers['content-type'] !== 'application/json') {
// eslint-disable-next-line no-throw-literal
Expand Down

0 comments on commit 2586061

Please sign in to comment.