Merge pull request #641 from JustinBeckwith/partial

refactor: drop usage of _.partial
This commit is contained in:
Michael Lumish 2018-11-20 11:30:05 -08:00 committed by GitHub
commit 4a9bf57f29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 3 deletions

View File

@ -948,9 +948,12 @@ exports.makeClientConstructor = function(methods, serviceName,
throw new Error('Method names cannot start with $');
}
var method_type = common.getMethodType(attrs);
var method_func = _.partial(requester_funcs[method_type], attrs.path,
attrs.requestSerialize,
attrs.responseDeserialize);
var method_func = function() {
return requester_funcs[method_type].apply(this,
[ attrs.path, attrs.requestSerialize, attrs.responseDeserialize ]
.concat([].slice.call(arguments))
);
};
if (class_options.deprecatedArgumentOrder) {
ServiceClient.prototype[name] =
deprecated_request_wrap[method_type](method_func);