question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Missing AbortSignal interface used in index.d.ts

See original GitHub issue

Describe 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

Screenshot 2021-11-30 at 7 51 59 PM

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
alecgibsoncommented, Jan 18, 2022

For anyone on Node.js v14, I’ve raised: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/58270

0reactions
jasonsaaymancommented, Jul 6, 2022

Going to close as newer node versions fix this and older versions are almost deprecated

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found