-
Notifications
You must be signed in to change notification settings - Fork 292
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
ship typings with npm package #436
base: master
Are you sure you want to change the base?
Conversation
Shouldn't the |
@hapi/wreck ships with its typings. |
export interface WreckHttpOptions { | ||
baseUrl?: string | undefined; | ||
socketPath?: string | undefined; | ||
payload?: unknown; | ||
headers?: { [key: string]: unknown } | undefined; | ||
redirects?: false | number | undefined; | ||
redirect303?: boolean | undefined; | ||
beforeRedirect?: (( | ||
redirectMethod: string, | ||
statusCode: number, | ||
location: string, | ||
resHeaders: { [key: string]: unknown }, | ||
redirectOptions: unknown, | ||
next: () => {}, | ||
) => void) | undefined; | ||
redirected?: ((statusCode: number, location: string, req: unknown) => void) | undefined; | ||
timeout?: number | undefined; | ||
maxBytes?: number | undefined; | ||
rejectUnauthorized?: boolean | undefined; | ||
agent?: unknown; | ||
secureProtocol?: string | undefined; | ||
ciphers?: string | undefined; | ||
events?: boolean | undefined; | ||
json?: boolean | "strict" | "force" | undefined; | ||
gunzip?: boolean | "force" | 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.
Replace with the types published by @hapi/wreck
: https://github.com/hapijs/wreck/blob/f53808548f8253c194da0f32ac9ae3d986e86d79/lib/index.d.ts#L194
My bad, I remembered it as if Still – since this module has |
Hey @Uzlopak thanks for these changes. I am not well versed in typescript typings, so I am inclined to merge your changes and publish a new major, and then refine if necessary. Any chance you could target these changes against develop? |
Fixes #435