Missing AbortSignal interface used in index.d.ts
See original GitHub issueDescribe the issue
AbortSignal
interface is missing from index.d.ts
. it is used indise interface AxiosRequestConfig
.
Example Code
export interface AxiosRequestConfig<D = any> {
url?: string;
method?: Method;
baseURL?: string;
transformRequest?: AxiosRequestTransformer | AxiosRequestTransformer[];
transformResponse?: AxiosResponseTransformer | AxiosResponseTransformer[];
headers?: AxiosRequestHeaders;
params?: any;
paramsSerializer?: (params: any) => string;
data?: D;
timeout?: number;
timeoutErrorMessage?: string;
withCredentials?: boolean;
adapter?: AxiosAdapter;
auth?: AxiosBasicCredentials;
responseType?: ResponseType;
xsrfCookieName?: string;
xsrfHeaderName?: string;
onUploadProgress?: (progressEvent: any) => void;
onDownloadProgress?: (progressEvent: any) => void;
maxContentLength?: number;
validateStatus?: ((status: number) => boolean) | null;
maxBodyLength?: number;
maxRedirects?: number;
socketPath?: string | null;
httpAgent?: any;
httpsAgent?: any;
proxy?: AxiosProxyConfig | false;
cancelToken?: CancelToken;
decompress?: boolean;
transitional?: TransitionalOptions;
signal?: AbortSignal;
insecureHTTPParser?: boolean;
}
Expected behavior, if applicable
AbortSignal
interface should be there
Environment
- Axios Version [0.22.0]
Additional context/Screenshots

Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
WaiterConfiguration | RDS Client - AWS SDK for JavaScript v3
abortController. Defined in packages/types/dist-types/waiter.d.ts:15. deprecated. Use abortSignal Abort controller. Used for ending the waiter early.
Read more >AbortController missing in TypeScript - fetch api - Stack Overflow
I am trying to use AbortController in TypeScript. Given this small file: const controller = new AbortController();. I get the following error ...
Read more >node_modules/typescript/lib/lib.dom.d.ts - Google Git
lib.dom.d.ts ... interface AddEventListenerOptions extends EventListenerOptions { ... Returns the AbortSignal object associated with this object.
Read more >typescript - UNPKG
typescript/lib/lib.dom.d.ts ... 1885, readonly signal: AbortSignal; ... 3546, /** The ChannelMergerNode interface, often used in conjunction with its ...
Read more >TypeScript errors and how to fix them
error TS1046: Top-level declarations in .d.ts files must start with either a 'declare' or 'export' modifier. Broken Code ❌. index.d ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
For anyone on Node.js v14, I’ve raised: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/58270
Going to close as newer node versions fix this and older versions are almost deprecated