File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -105,7 +105,7 @@ declare module "libname" {
105105
106106你可直接编辑 ` node_modules/@types/foo/index.d.ts ` 来验证你的修改。接着,请使用下文所述的步骤将这些修改加入本仓库。
107107
108- 你亦可以使用[ 模块扩充(Module Argumentation) ] ( https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation ) 来向 Definitely Typed 模块中添加类型,或使用上文所示的 ` declare module ` 方法来覆盖 ` node_modules ` 中的版本。
108+ 你亦可以使用[ 模块扩充(Module Augmentation ] ( https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation ) 来向 Definitely Typed 模块中添加类型,或使用上文所示的 ` declare module ` 方法来覆盖 ` node_modules ` 中的版本。
109109
110110#### 为新增的软件包添加测试
111111
Original file line number Diff line number Diff line change @@ -23,6 +23,25 @@ client.getSymlink("newfile.png");
2323client . getSymlink ( "newfile.png" , { versionId : "123" } ) ;
2424
2525client . listV2 ( { "max-keys" : 1000 } ) ;
26+
27+ async function listV2Exhaustive ( ) {
28+ let continuationToken = "" ;
29+
30+ while ( true ) {
31+ let res = await client . listV2 ( {
32+ "max-keys" : 1000 ,
33+ "continuation-token" : continuationToken ,
34+ } ) ;
35+
36+ if ( res . isTruncated ) {
37+ continuationToken = res . nextContinuationToken ;
38+ } else {
39+ continuationToken = "" ;
40+ break ;
41+ }
42+ }
43+ }
44+
2645client . copy ( "newfile.png" , "sourcefile.png" ) ;
2746client . copy ( "newfile.png" , "sourcefile.png" , { timeout : 1000 } ) ;
2847client . copy ( "newfile.png" , "sourcefile.png" , "sourceBucket" ) ;
Original file line number Diff line number Diff line change @@ -317,6 +317,15 @@ declare namespace OSS {
317317 res : NormalSuccessResponse ;
318318 }
319319
320+ interface ListV2ObjectResult {
321+ objects : ObjectMeta [ ] ;
322+ prefixes : string [ ] ;
323+ isTruncated : boolean ;
324+ nextContinuationToken : string ;
325+ keyCount : number ;
326+ res : NormalSuccessResponse ;
327+ }
328+
320329 interface PutObjectOptions {
321330 /** the operation timeout */
322331 timeout ?: number | undefined ;
@@ -680,7 +689,7 @@ declare namespace OSS {
680689 /**
681690 * @since 6.12.0
682691 */
683- listV2 ( query : ListV2ObjectsQuery | null , options ?: RequestOptions ) : Promise < ListObjectResult > ;
692+ listV2 ( query : ListV2ObjectsQuery | null , options ?: RequestOptions ) : Promise < ListV2ObjectResult > ;
684693
685694 put ( name : string , file : any , options ?: PutObjectOptions ) : Promise < PutObjectResult > ;
686695
@@ -1017,7 +1026,7 @@ declare class OSS {
10171026 /**
10181027 * List Objects in the bucket.(V2)
10191028 */
1020- listV2 ( query : OSS . ListV2ObjectsQuery | null , options ?: OSS . RequestOptions ) : Promise < OSS . ListObjectResult > ;
1029+ listV2 ( query : OSS . ListV2ObjectsQuery | null , options ?: OSS . RequestOptions ) : Promise < OSS . ListV2ObjectResult > ;
10211030
10221031 /**
10231032 * Add an object to the bucket.
You can’t perform that action at this time.
0 commit comments