-
Notifications
You must be signed in to change notification settings - Fork 2
feat: update get
signature
#23
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
Conversation
✅ Deploy Preview for blobs-js ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
src/main.ts
Outdated
async get(key: string, { type }: { type: 'blob' }): Promise<Blob> | ||
// eslint-disable-next-line @typescript-eslint/no-explicit-any | ||
async get(key: string, { type }: { type: 'json' }): Promise<any> | ||
async get(key: string, { type }: { type: 'stream' }): Promise<ReadableStream | null> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how come this is the only one that can resolve to null
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops! Good catch. That shouldn't be the case. Fixed in 55f9223.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which problem is this pull request solving?
Updates the
type
property of theget
method to use a union rather than an enum, to prevent this from happening:Also adds the overload for
{type: "json"}
which is currently missing.