Skip to content

Commit dfb5030

Browse files
🤖 Merge PR DefinitelyTyped#73929 [ali-oss] fix listV2 type declaration by @StarHeartHunt
1 parent b9d1c33 commit dfb5030

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

‎types/ali-oss/ali-oss-tests.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const ossOptions: OSS.Options = {
99

1010
const client = new OSS(ossOptions);
1111

12+
client.listV2({ "max-keys": 1000 });
1213
client.copy("newfile.png", "sourcefile.png");
1314
client.copy("newfile.png", "sourcefile.png", { timeout: 1000 });
1415
client.copy("newfile.png", "sourcefile.png", "sourceBucket");

‎types/ali-oss/index.d.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ declare namespace OSS {
295295
/** only search current dir, not including subdir */
296296
delimiter?: string | number;
297297
/** max objects, default is 100, limit to 1000 */
298-
"max-keys"?: string;
298+
"max-keys"?: string | number;
299299
/**
300300
* The name of the object from which the list operation begins.
301301
* If this parameter is specified, objects whose names are alphabetically greater than the start-after parameter value are returned.
@@ -1006,7 +1006,7 @@ declare class OSS {
10061006
/**
10071007
* List Objects in the bucket.(V2)
10081008
*/
1009-
listV2(query: OSS.ListV2ObjectsQuery | null, options: OSS.RequestOptions): Promise<OSS.ListObjectResult>;
1009+
listV2(query: OSS.ListV2ObjectsQuery | null, options?: OSS.RequestOptions): Promise<OSS.ListObjectResult>;
10101010

10111011
/**
10121012
* Add an object to the bucket.

‎types/ali-oss/package.json‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
{
1313
"name": "Ptrdu",
1414
"githubUsername": "ptrdu"
15+
},
16+
{
17+
"name": "StarHeart",
18+
"githubUsername": "StarHeartHunt"
1519
}
1620
]
1721
}

0 commit comments

Comments
 (0)