Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ts): improve return types for response metadata #666

Merged
merged 4 commits into from
Apr 7, 2019
Merged

Conversation

JustinBeckwith
Copy link
Contributor

@JustinBeckwith JustinBeckwith commented Apr 5, 2019

As a bonus, drops dependencies on teeny-request and @types/request

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Apr 5, 2019
@JustinBeckwith JustinBeckwith changed the title chore: remove un-needed deps chore: fix return types for response metadata Apr 5, 2019
@JustinBeckwith JustinBeckwith changed the title chore: fix return types for response metadata fix(ts): improve return types for response metadata Apr 5, 2019
Copy link
Contributor

@bcoe bcoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good to me Metadata reads much better than r.Response.

src/bucket.ts Outdated
@@ -176,28 +174,28 @@ export interface GetBucketOptions extends GetConfig {
userProject?: string;
}

export type GetBucketResponse = [Bucket, request.Response];
export type GetBucketResponse = [Bucket, Metadata];

export interface GetBucketCallback {
(err: ApiError|null, bucket: Bucket|null,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like the linting gods might be angry.

@codecov
Copy link

codecov bot commented Apr 7, 2019

Codecov Report

Merging #666 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #666   +/-   ##
=======================================
  Coverage   98.04%   98.04%           
=======================================
  Files           9        9           
  Lines         921      921           
  Branches      100      100           
=======================================
  Hits          903      903           
  Misses          9        9           
  Partials        9        9
Impacted Files Coverage Δ
src/bucket.ts 95.74% <ø> (ø) ⬆️
src/acl.ts 100% <ø> (ø) ⬆️
src/file.ts 98.8% <ø> (ø) ⬆️
src/iam.ts 100% <ø> (ø) ⬆️
src/notification.ts 100% <100%> (ø) ⬆️
src/channel.ts 100% <100%> (ø) ⬆️
src/storage.ts 98.33% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d2bbcf3...9d68555. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants