-
Notifications
You must be signed in to change notification settings - Fork 5
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: bump typescript and fix errors #50
base: master
Are you sure you want to change the base?
Conversation
@@ -84,7 +84,7 @@ export function gretch<T = DefaultGretchResponse, A = DefaultGretchError>( | |||
...(rest as RequestInit), | |||
}; | |||
const controller = | |||
typeof AbortController !== "undefined" ? new AbortController() : null; | |||
typeof AbortController !== "undefined" ? new AbortController() : undefined; |
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.
TS didn't like an optional param (evals to Type | undefined
) being potentially null
([] as GretchBeforeHook[]) | ||
.concat(hooks.before) | ||
.forEach((hook) => hook(request, opts)); |
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.
Just flattening an array and iterating over it
attempts: number; | ||
codes: number[]; | ||
methods: string[]; | ||
delay: number; |
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.
User options use Partial<RetryOptions>
, and we merge in defaults, so the source type should be non-optionally typed.
abc23ce
to
69dd940
Compare
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.
Nervous to merge this without at least a patch bump due to the changes. Bump the patch version (which will prevent breakages in existing apps), and this should be fine.
Dismissing bc needs a version bump, but don't want to block with req changes
Hey sorry for the delay on these, my headspace has been taken up by my new job. Hope to get back to these soon! In the meantime obviously feel free to do as you wish with the library ✌️ |
Just kicking the tires, minor stuff. This won't result in a package version bump.