Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev/ut #205

Merged
merged 14 commits into from
May 8, 2024
3 changes: 2 additions & 1 deletion index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2081,8 +2081,9 @@ declare class COS {

// 实例方法
/** 获取用户的 bucket 列表 @see https://cloud.tencent.com/document/product/436/8291 */
getService(callback: (err: COS.CosError, data: COS.GetServiceResult) => void): void;
getService(params: COS.GetServiceParams, callback: (err: COS.CosError, data: COS.GetServiceResult) => void): void;
getService(params: COS.GetServiceParams): Promise<COS.GetServiceResult>;
getService(params?: COS.GetServiceParams): Promise<COS.GetServiceResult>;

/** 创建 Bucket,并初始化访问权限 @see https://cloud.tencent.com/document/product/436/7738 */
putBucket(params: COS.PutBucketParams, callback: (err: COS.CosError, data: COS.PutBucketResult) => void): void;
Expand Down
4 changes: 0 additions & 4 deletions sdk/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ var fs = require('fs');
* @param {Function} callback 回调函数,必须
*/
function getService(params, callback) {
if (typeof params === 'function') {
callback = params;
params = {};
}
var protocol = this.options.Protocol || (util.isBrowser && location.protocol === 'http:' ? 'http:' : 'https:');
var domain = this.options.ServiceDomain;
var appId = params.AppId || this.options.appId;
Expand Down
Loading