Skip to content

Commit 78173c7

Browse files
authored
feat: add better types for request.request.signal (#649)
This replaces the `any` value with the proper `AbortSignal` type
1 parent b01e2fb commit 78173c7

File tree

3 files changed

+1
-9
lines changed

3 files changed

+1
-9
lines changed

src/RequestRequestOptions.ts

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import type { Fetch } from "./Fetch.js";
2-
import type { Signal } from "./Signal.js";
32

43
/**
54
* Octokit-specific request options which are ignored for the actual request, but can be used by Octokit or plugins to manipulate how the request is sent or how a response is handled
@@ -12,7 +11,7 @@ export type RequestRequestOptions = {
1211
/**
1312
* Use an `AbortController` instance to cancel a request. In node you can only cancel streamed requests.
1413
*/
15-
signal?: Signal;
14+
signal?: AbortSignal;
1615
/**
1716
* If set to `false`, the response body will not be parsed and will be returned as a stream.
1817
*/

src/Signal.ts

-6
This file was deleted.

src/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export * from "./RequestParameters.js";
1313
export * from "./RequestRequestOptions.js";
1414
export * from "./ResponseHeaders.js";
1515
export * from "./Route.js";
16-
export * from "./Signal.js";
1716
export * from "./StrategyInterface.js";
1817
export * from "./Url.js";
1918
export * from "./VERSION.js";

0 commit comments

Comments
 (0)