Skip to content

Commit 5cb278e

Browse files
authoredMay 13, 2023
fix(types): move OctokitOptions augmentation to the index file (#590) - thanks @Andarist
1 parent 8372572 commit 5cb278e

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed
 

‎src/index.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import BottleneckLight from "bottleneck/light";
33
import { Octokit } from "@octokit/core";
44
import { OctokitOptions } from "@octokit/core/dist-types/types.d";
5-
import { Groups } from "./types";
5+
import { Groups, ThrottlingOptions } from "./types";
66
import { VERSION } from "./version";
77

88
import { wrapRequest } from "./wrap-request";
@@ -192,3 +192,9 @@ export function throttling(octokit: Octokit, octokitOptions: OctokitOptions) {
192192
}
193193
throttling.VERSION = VERSION;
194194
throttling.triggersNotification = triggersNotification;
195+
196+
declare module "@octokit/core/dist-types/types.d" {
197+
interface OctokitOptions {
198+
throttle?: ThrottlingOptions;
199+
}
200+
}

‎src/types.ts

-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
import { Octokit } from "@octokit/core";
22
import Bottleneck from "bottleneck";
33

4-
declare module "@octokit/core/dist-types/types.d" {
5-
interface OctokitOptions {
6-
throttle?: ThrottlingOptions;
7-
}
8-
}
9-
104
type LimitHandler = (
115
retryAfter: number,
126
options: object,

0 commit comments

Comments
 (0)
Please sign in to comment.