Skip to content

Commit

Permalink
feat: add better types for request.request.signal (#649)
Browse files Browse the repository at this point in the history
This replaces the `any` value with the proper `AbortSignal` type
  • Loading branch information
wolfy1339 authored Sep 27, 2024
1 parent b01e2fb commit 78173c7
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 9 deletions.
3 changes: 1 addition & 2 deletions src/RequestRequestOptions.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import type { Fetch } from "./Fetch.js";
import type { Signal } from "./Signal.js";

/**
* 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
Expand All @@ -12,7 +11,7 @@ export type RequestRequestOptions = {
/**
* Use an `AbortController` instance to cancel a request. In node you can only cancel streamed requests.
*/
signal?: Signal;
signal?: AbortSignal;
/**
* If set to `false`, the response body will not be parsed and will be returned as a stream.
*/
Expand Down
6 changes: 0 additions & 6 deletions src/Signal.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export * from "./RequestParameters.js";
export * from "./RequestRequestOptions.js";
export * from "./ResponseHeaders.js";
export * from "./Route.js";
export * from "./Signal.js";
export * from "./StrategyInterface.js";
export * from "./Url.js";
export * from "./VERSION.js";
Expand Down

0 comments on commit 78173c7

Please sign in to comment.