mirror of https://github.com/grpc/grpc-node.git
Merge pull request #641 from JustinBeckwith/partial
refactor: drop usage of _.partial
This commit is contained in:
commit
4a9bf57f29
|
@ -948,9 +948,12 @@ exports.makeClientConstructor = function(methods, serviceName,
|
||||||
throw new Error('Method names cannot start with $');
|
throw new Error('Method names cannot start with $');
|
||||||
}
|
}
|
||||||
var method_type = common.getMethodType(attrs);
|
var method_type = common.getMethodType(attrs);
|
||||||
var method_func = _.partial(requester_funcs[method_type], attrs.path,
|
var method_func = function() {
|
||||||
attrs.requestSerialize,
|
return requester_funcs[method_type].apply(this,
|
||||||
attrs.responseDeserialize);
|
[ attrs.path, attrs.requestSerialize, attrs.responseDeserialize ]
|
||||||
|
.concat([].slice.call(arguments))
|
||||||
|
);
|
||||||
|
};
|
||||||
if (class_options.deprecatedArgumentOrder) {
|
if (class_options.deprecatedArgumentOrder) {
|
||||||
ServiceClient.prototype[name] =
|
ServiceClient.prototype[name] =
|
||||||
deprecated_request_wrap[method_type](method_func);
|
deprecated_request_wrap[method_type](method_func);
|
||||||
|
|
Loading…
Reference in New Issue