Replaces `string` type with actual possible values

Enhances documentation of the `type` argument for `grpc.Server.register`, leveraging on JSDoc's support for literal enumerations.

This keeps developers from having to dig through the source code to find the valid values.
This commit is contained in:
Martín Valdés de León 2018-07-20 11:55:48 +02:00 committed by GitHub
parent b608290727
commit 671b5837e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -802,7 +802,7 @@ Server.prototype.start = function() {
* request values and returns a stream of response values
* @param {grpc~serialize} serialize Serialization function for responses
* @param {grpc~deserialize} deserialize Deserialization function for requests
* @param {string} type The streaming type of method that this handles
* @param {('unary'|'client_stream'|'server_stream'|'bidi')} type The streaming type of method that this handles
* @return {boolean} True if the handler was set. False if a handler was already
* set for that name.
*/