Skip to content

Commit

Permalink
fix(bindings/nodejs): Fix index.d.ts not updated (#2117)
Browse files Browse the repository at this point in the history
* fix(bindings/nodejs): Fix index.d.ts not updated

Signed-off-by: Xuanwo <github@xuanwo.io>

* Make add check

Signed-off-by: Xuanwo <github@xuanwo.io>

---------

Signed-off-by: Xuanwo <github@xuanwo.io>
  • Loading branch information
Xuanwo authored Apr 25, 2023
1 parent 88915b9 commit d6ce049
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/bindings_nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,10 @@ jobs:

- name: Build
run: yarn build:debug

- name: Check diff
run: git diff --exit-code

- name: Test bindings
run: yarn test

Expand Down
18 changes: 11 additions & 7 deletions bindings/nodejs/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,14 +336,14 @@ export class Operator {
* ### Example
*
* ```javascript
* const req = op.presignRead(path, parseInt(expires));
* const req = await op.presignRead(path, parseInt(expires));
*
* console.log("method: ", req.method);
* console.log("url: ", req.url);
* console.log("headers: ", req.headers);
* ```
*/
presignRead(path: string, expires: number): PresignedRequest
presignRead(path: string, expires: number): Promise<PresignedRequest>
/**
* Get a presigned request for write.
*
Expand All @@ -352,14 +352,14 @@ export class Operator {
* ### Example
*
* ```javascript
* const req = op.presignWrite(path, parseInt(expires));
* const req = await op.presignWrite(path, parseInt(expires));
*
* console.log("method: ", req.method);
* console.log("url: ", req.url);
* console.log("headers: ", req.headers);
* ```
*/
presignWrite(path: string, expires: number): PresignedRequest
presignWrite(path: string, expires: number): Promise<PresignedRequest>
/**
* Get a presigned request for stat.
*
Expand All @@ -368,14 +368,14 @@ export class Operator {
* ### Example
*
* ```javascript
* const req = op.presignStat(path, parseInt(expires));
* const req = await op.presignStat(path, parseInt(expires));
*
* console.log("method: ", req.method);
* console.log("url: ", req.url);
* console.log("headers: ", req.headers);
* ```
*/
presignStat(path: string, expires: number): PresignedRequest
presignStat(path: string, expires: number): Promise<PresignedRequest>
}
export class Entry {
/** Return the path of this entry. */
Expand All @@ -396,7 +396,11 @@ export class Metadata {
get contentType(): string | null
/** ETag of this object. */
get etag(): string | null
/** Last Modified of this object.(UTC) */
/**
* Last Modified of this object.
*
* We will output this time in RFC3339 format like `1996-12-19T16:39:57+08:00`.
*/
get lastModified(): string | null
}
export class Lister {
Expand Down

0 comments on commit d6ce049

Please # to comment.