-
Notifications
You must be signed in to change notification settings - Fork 541
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: interceptors.d.ts has no default export #3332
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
/// <reference types="node" /> | ||
|
||
import { File } from './file' | ||
import { SpecIterator, SpecIterableIterator } from './fetch' | ||
import { SpecIterableIterator } from './fetch' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. was unused import |
||
|
||
/** | ||
* A `string` or `File` that represents a single value from a set of `FormData` key-value pairs. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
import Dispatcher from "./dispatcher"; | ||
import RetryHandler from "./retry-handler"; | ||
|
||
export type DumpInterceptorOpts = { maxSize?: number } | ||
export type RetryInterceptorOpts = RetryHandler.RetryOptions | ||
export type RedirectInterceptorOpts = { maxRedirections?: number } | ||
export default Interceptors; | ||
|
||
export declare function createRedirectInterceptor (opts: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor | ||
export declare function dump(opts?: DumpInterceptorOpts): Dispatcher.DispatcherComposeInterceptor | ||
export declare function retry(opts?: RetryInterceptorOpts): Dispatcher.DispatcherComposeInterceptor | ||
export declare function redirect(opts?: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor | ||
declare namespace Interceptors { | ||
export type DumpInterceptorOpts = { maxSize?: number } | ||
export type RetryInterceptorOpts = RetryHandler.RetryOptions | ||
export type RedirectInterceptorOpts = { maxRedirections?: number } | ||
|
||
export function createRedirectInterceptor(opts: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor | ||
export function dump(opts?: DumpInterceptorOpts): Dispatcher.DispatcherComposeInterceptor | ||
export function retry(opts?: RetryInterceptorOpts): Dispatcher.DispatcherComposeInterceptor | ||
export function redirect(opts?: RedirectInterceptorOpts): Dispatcher.DispatcherComposeInterceptor | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,9 +55,7 @@ interface WebidlUtil { | |
V: unknown, | ||
bitLength: number, | ||
signedness: 'signed' | 'unsigned', | ||
opts?: ConvertToIntOpts, | ||
prefix: string, | ||
argument: string | ||
opts?: ConvertToIntOpts | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. tsc reported that after optional paramaters there can not be mandatory parameters. Compared with implementation and the following arguments are not existing. |
||
): 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.
eslint is throwing typings errors. to avoid it we simulate an skipLibCheck by pointing to the types folder. this is not nice but eslint sucks. So this is a low level solution.