Created
March 5, 2018 22:05
-
-
Save fubar/369e8e87489611588f8687381c0be09d to your computer and use it in GitHub Desktop.
restify: Adds type-hinting for unresolved properties and functions of restify's RestifyRequest class
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const RestifyRequest = require('restify/lib/request'); | |
| /** | |
| * The purpose of this class is to add type-hinting for unresolved properties and functions. | |
| * | |
| * restify's Request class is an extension of Node's http.IncomingMessage | |
| * | |
| * @class Request | |
| */ | |
| class Request extends RestifyRequest { | |
| /** @member {Object} Request#body Requires use of the bodyParser plugin. See http://restify.com/docs/plugins-api/#bodyparser */ | |
| /** @member {Object} Request#headers */ | |
| /** @member {String} Request#method HTTP method */ | |
| /** @member {Object} Request#params Contains URL-placeholders. Query string parameters and those present in a JSON body are parsed into query and body, respectively. */ | |
| /** @member {Object} Request#query Requires use of the queryParser plugin. See http://restify.com/docs/plugins-api/#queryparser */ | |
| /** @member {String} Request#url */ | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment