File tree Expand file tree Collapse file tree 3 files changed +432
-170
lines changed Expand file tree Collapse file tree 3 files changed +432
-170
lines changed Original file line number Diff line number Diff line change @@ -2081,8 +2081,9 @@ declare class COS {
2081
2081
2082
2082
// 实例方法
2083
2083
/** 获取用户的 bucket 列表 @see https://cloud.tencent.com/document/product/436/8291 */
2084
+ getService ( callback : ( err : COS . CosError , data : COS . GetServiceResult ) => void ) : void ;
2084
2085
getService ( params : COS . GetServiceParams , callback : ( err : COS . CosError , data : COS . GetServiceResult ) => void ) : void ;
2085
- getService ( params : COS . GetServiceParams ) : Promise < COS . GetServiceResult > ;
2086
+ getService ( params ? : COS . GetServiceParams ) : Promise < COS . GetServiceResult > ;
2086
2087
2087
2088
/** 创建 Bucket,并初始化访问权限 @see https://cloud.tencent.com/document/product/436/7738 */
2088
2089
putBucket ( params : COS . PutBucketParams , callback : ( err : COS . CosError , data : COS . PutBucketResult ) => void ) : void ;
Original file line number Diff line number Diff line change @@ -14,10 +14,6 @@ var fs = require('fs');
14
14
* @param {Function } callback 回调函数,必须
15
15
*/
16
16
function getService ( params , callback ) {
17
- if ( typeof params === 'function' ) {
18
- callback = params ;
19
- params = { } ;
20
- }
21
17
var protocol = this . options . Protocol || ( util . isBrowser && location . protocol === 'http:' ? 'http:' : 'https:' ) ;
22
18
var domain = this . options . ServiceDomain ;
23
19
var appId = params . AppId || this . options . appId ;
You can’t perform that action at this time.
0 commit comments