Skip to content

Commit 4b80494

Browse files
authored
fix:补充d.ts (#165)
* feat: 新增cov命令 * fix: 补充d.ts
1 parent e91b814 commit 4b80494

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

demo/demo.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1506,9 +1506,7 @@ function downloadFile() {
15061506
ChunkSize: 1024 * 1024 * 8, // 文件大于 8MB 用分片下载
15071507
ParallelLimit: 5, // 分片并发数
15081508
RetryTimes: 3, // 分片失败重试次数
1509-
onTaskReady: function (taskId) {
1510-
console.log(taskId);
1511-
},
1509+
TaskId: '123',
15121510
onProgress: function (progressData) {
15131511
console.log(JSON.stringify(progressData));
15141512
},

index.d.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1696,6 +1696,8 @@ Bulk:批量模式,恢复时间为24 - 48小时。 */
16961696
FilePath: string,
16971697
/** 分块上传时,每片的字节数大小,默认值1048576(1MB) */
16981698
ChunkSize?: number,
1699+
/** 分块上传时,每片的字节数大小,默认值1048576(1MB) */
1700+
SliceSize?: number,
16991701
/** 请求里的 Url Query 参数 */
17001702
Query?: string,
17011703
/** RFC 2616 中定义的缓存指令,将作为对象元数据保存 */
@@ -1928,6 +1930,7 @@ Bulk:批量模式,恢复时间为24 - 48小时。 */
19281930
ChunkSize?: number,
19291931
ParallelLimit?: number,
19301932
RetryTimes?: number,
1933+
TaskId?: string,
19311934
onTaskReady?: (TaskId: COS.TaskId) => void,
19321935
onProgress?: onProgress,
19331936
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"demo-sts": "node demo/demo-sts.js",
1010
"demo-sts-scope": "node demo/demo-sts-scope.js",
1111
"test": "mocha test/test.js",
12+
"cov": "istanbul cover _mocha -- -u exports 'test/test.js'",
1213
"nyc": "nyc --reporter=clover --reporter=cobertura mocha --reporter xunit --reporter-options output=mocha.xml test/test.js",
1314
"csp": "mocha test/csp.js"
1415
},

0 commit comments

Comments
 (0)