From 6cde0631e816a83e69871ee8da30b8a9ebf4f603 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn?= Date: Fri, 29 Sep 2017 13:58:28 +0200 Subject: [PATCH 1/2] Typos fixed --- packages/grpc-native-core/index.js | 2 +- packages/grpc-native-core/src/client.js | 2 +- packages/grpc-native-core/src/constants.js | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/packages/grpc-native-core/index.js b/packages/grpc-native-core/index.js index 0d814cc3..ca056b3a 100644 --- a/packages/grpc-native-core/index.js +++ b/packages/grpc-native-core/index.js @@ -67,7 +67,7 @@ grpc.setDefaultRootsPem(fs.readFileSync(SSL_ROOTS_PATH, 'ascii')); * @param {(number|string)=} [options.protobufjsVersion='detect'] 5 and 6 * respectively indicate that an object from the corresponding version of * Protobuf.js is provided in the value argument. If the option is 'detect', - * gRPC wll guess what the version is based on the structure of the value. + * gRPC will guess what the version is based on the structure of the value. * @return {Object} The resulting gRPC object. */ exports.loadObject = function loadObject(value, options) { diff --git a/packages/grpc-native-core/src/client.js b/packages/grpc-native-core/src/client.js index d3c39ca4..7c5c418e 100644 --- a/packages/grpc-native-core/src/client.js +++ b/packages/grpc-native-core/src/client.js @@ -929,7 +929,7 @@ exports.makeClientConstructor = function(methods, serviceName, * Return the underlying channel object for the specified client * @memberof grpc * @alias grpc~getClientChannel - * @param {Client} client + * @param {Client} client The client * @return {Channel} The channel * @see grpc.Client#getChannel */ diff --git a/packages/grpc-native-core/src/constants.js b/packages/grpc-native-core/src/constants.js index c90e44d0..b91d4214 100644 --- a/packages/grpc-native-core/src/constants.js +++ b/packages/grpc-native-core/src/constants.js @@ -139,7 +139,8 @@ exports.status = { * a backoff. * * See litmus test above for deciding between FAILED_PRECONDITION, - * ABORTED, and UNAVAILABLE. */ + * ABORTED, and UNAVAILABLE. + */ UNAVAILABLE: 14, /** Unrecoverable data loss or corruption. */ DATA_LOSS: 15, @@ -150,7 +151,7 @@ exports.status = { UNAUTHENTICATED: 16 }; -/* The comments about propagation bit flags are copied rom +/* The comments about propagation bit flags are copied from * include/grpc/impl/codegen/propagation_bits.h for the purpose of including * them in generated documentation. */ From f14785628796047b9f67bbc8abe74c1538f24950 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn?= Date: Fri, 29 Sep 2017 14:17:11 +0200 Subject: [PATCH 2/2] Fix type links --- packages/grpc-native-core/index.js | 4 ++-- packages/grpc-native-core/src/client.js | 10 +++++----- packages/grpc-native-core/src/common.js | 2 +- packages/grpc-native-core/src/credentials.js | 18 +++++++++--------- packages/grpc-native-core/src/metadata.js | 2 +- packages/grpc-native-core/src/server.js | 2 +- 6 files changed, 19 insertions(+), 19 deletions(-) diff --git a/packages/grpc-native-core/index.js b/packages/grpc-native-core/index.js index ca056b3a..af597f70 100644 --- a/packages/grpc-native-core/index.js +++ b/packages/grpc-native-core/index.js @@ -213,7 +213,7 @@ exports.ServerCredentials = grpc.ServerCredentials; * Create insecure server credentials * @name grpc.ServerCredentials.createInsecure * @kind function - * @return grpc.ServerCredentials + * @return {grpc.ServerCredentials} */ /** @@ -234,7 +234,7 @@ exports.ServerCredentials = grpc.ServerCredentials; * the server * @param {boolean} [checkClientCertificate=false] Indicates that the server * should request and verify the client's certificates - * @return grpc.ServerCredentials + * @return {grpc.ServerCredentials} */ exports.makeGenericClientConstructor = client.makeClientConstructor; diff --git a/packages/grpc-native-core/src/client.js b/packages/grpc-native-core/src/client.js index 7c5c418e..24af23b8 100644 --- a/packages/grpc-native-core/src/client.js +++ b/packages/grpc-native-core/src/client.js @@ -393,8 +393,8 @@ ClientDuplexStream.prototype.getPeer = getPeer; /** * Any client call type - * @typedef {(ClientUnaryCall|ClientReadableStream| - * ClientWritableStream|ClientDuplexStream)} + * @typedef {(grpc~ClientUnaryCall|grpc~ClientReadableStream| + * grpc~ClientWritableStream|grpc~ClientDuplexStream)} * grpc.Client~Call */ @@ -450,7 +450,7 @@ function getCall(channel, method, options) { * @memberof grpc * @constructor * @param {string} address Server address to connect to - * @param {grpc~ChannelCredentials} credentials Credentials to use to connect to + * @param {grpc.credentials~ChannelCredentials} credentials Credentials to use to connect to * the server * @param {Object} options Options to apply to channel creation */ @@ -929,7 +929,7 @@ exports.makeClientConstructor = function(methods, serviceName, * Return the underlying channel object for the specified client * @memberof grpc * @alias grpc~getClientChannel - * @param {Client} client The client + * @param {grpc.Client} client The client * @return {Channel} The channel * @see grpc.Client#getChannel */ @@ -945,7 +945,7 @@ exports.getClientChannel = function(client) { * start connecting if it has not already done so. * @memberof grpc * @alias grpc~waitForClientReady - * @param {Client} client The client to wait on + * @param {grpc.Client} client The client to wait on * @param {grpc~Deadline} deadline When to stop waiting for a connection. Pass * Infinity to wait forever. * @param {function(Error)} callback The callback to call when done attempting diff --git a/packages/grpc-native-core/src/common.js b/packages/grpc-native-core/src/common.js index 5a444f5e..5882cf1c 100644 --- a/packages/grpc-native-core/src/common.js +++ b/packages/grpc-native-core/src/common.js @@ -145,7 +145,7 @@ exports.defaultGrpcOptions = { * a number of milliseconds since the Unix Epoch. If it is Infinity, the * deadline will never be reached. If it is -Infinity, the deadline has already * passed. - * @typedef {(number|date)} grpc~Deadline + * @typedef {(number|Date)} grpc~Deadline */ /** diff --git a/packages/grpc-native-core/src/credentials.js b/packages/grpc-native-core/src/credentials.js index d68d888e..a2312966 100644 --- a/packages/grpc-native-core/src/credentials.js +++ b/packages/grpc-native-core/src/credentials.js @@ -86,7 +86,7 @@ var _ = require('lodash'); * @param {Buffer=} private_key The client certificate private key, if * applicable * @param {Buffer=} cert_chain The client certificate cert chain, if applicable - * @return {grpc.credentials.ChannelCredentials} The SSL Credentials object + * @return {grpc.credentials~ChannelCredentials} The SSL Credentials object */ exports.createSsl = ChannelCredentials.createSsl; @@ -113,7 +113,7 @@ exports.createSsl = ChannelCredentials.createSsl; * @alias grpc.credentials.createFromMetadataGenerator * @param {grpc.credentials~generateMetadata} metadata_generator The function * that generates metadata - * @return {grpc.credentials.CallCredentials} The credentials object + * @return {grpc.credentials~CallCredentials} The credentials object */ exports.createFromMetadataGenerator = function(metadata_generator) { return CallCredentials.createFromPlugin(function(service_url, cb_data, @@ -143,7 +143,7 @@ exports.createFromMetadataGenerator = function(metadata_generator) { * @alias grpc.credentials.createFromGoogleCredential * @param {external:GoogleCredential} google_credential The Google credential * object to use - * @return {grpc.credentials.CallCredentials} The resulting credentials object + * @return {grpc.credentials~CallCredentials} The resulting credentials object */ exports.createFromGoogleCredential = function(google_credential) { return exports.createFromMetadataGenerator(function(auth_context, callback) { @@ -166,10 +166,10 @@ exports.createFromGoogleCredential = function(google_credential) { * ChannelCredentials object. * @memberof grpc.credentials * @alias grpc.credentials.combineChannelCredentials - * @param {ChannelCredentials} channel_credential The ChannelCredentials to + * @param {grpc.credentials~ChannelCredentials} channel_credential The ChannelCredentials to * start with - * @param {...CallCredentials} credentials The CallCredentials to compose - * @return ChannelCredentials A credentials object that combines all of the + * @param {...grpc.credentials~CallCredentials} credentials The CallCredentials to compose + * @return {grpc.credentials~ChannelCredentials} A credentials object that combines all of the * input credentials */ exports.combineChannelCredentials = function(channel_credential) { @@ -184,8 +184,8 @@ exports.combineChannelCredentials = function(channel_credential) { * Combine any number of CallCredentials into a single CallCredentials object * @memberof grpc.credentials * @alias grpc.credentials.combineCallCredentials - * @param {...CallCredentials} credentials the CallCredentials to compose - * @return CallCredentials A credentials object that combines all of the input + * @param {...grpc.credentials~CallCredentials} credentials The CallCredentials to compose + * @return {grpc.credentials~CallCredentials} A credentials object that combines all of the input * credentials */ exports.combineCallCredentials = function() { @@ -202,6 +202,6 @@ exports.combineCallCredentials = function() { * @memberof grpc.credentials * @alias grpc.credentials.createInsecure * @kind function - * @return {ChannelCredentials} The insecure credentials object + * @return {grpc.credentials~ChannelCredentials} The insecure credentials object */ exports.createInsecure = ChannelCredentials.createInsecure; diff --git a/packages/grpc-native-core/src/metadata.js b/packages/grpc-native-core/src/metadata.js index 46f9e0fe..63bbed76 100644 --- a/packages/grpc-native-core/src/metadata.js +++ b/packages/grpc-native-core/src/metadata.js @@ -132,7 +132,7 @@ Metadata.prototype.getMap = function() { /** * Clone the metadata object. - * @return {Metadata} The new cloned object + * @return {grpc.Metadata} The new cloned object */ Metadata.prototype.clone = function() { var copy = new Metadata(); diff --git a/packages/grpc-native-core/src/server.js b/packages/grpc-native-core/src/server.js index 8b7c0b68..cee852e9 100644 --- a/packages/grpc-native-core/src/server.js +++ b/packages/grpc-native-core/src/server.js @@ -470,7 +470,7 @@ ServerDuplexStream.prototype._write = _write; /** * Send the initial metadata for a writable stream. * @alias grpc~ServerUnaryCall#sendMetadata - * @param {Metadata} responseMetadata Metadata to send + * @param {grpc.Metadata} responseMetadata Metadata to send */ function sendMetadata(responseMetadata) { /* jshint validthis: true */