Skip to content

Commit

Permalink
fix(types): export ThrottlingOptions (#631)
Browse files Browse the repository at this point in the history
  • Loading branch information
Uzlopak authored Oct 21, 2023
1 parent 9a61d13 commit c4147c9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,3 +181,5 @@ declare module "@octokit/core/dist-types/types.d" {
throttle?: ThrottlingOptions;
}
}

export type { ThrottlingOptions };
16 changes: 16 additions & 0 deletions test/exports.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import type { ThrottlingOptions } from "../src";
import type { Octokit } from "@octokit/core";

describe("Exports", function () {
it("Should export ThrottlingOptions", function () {
const options: ThrottlingOptions = {
enabled: true,
onRateLimit: () => {},
onSecondaryRateLimit: () => {},
};

options.enabled = false;
options.onRateLimit(10, {}, {} as Octokit, 0);
options.onSecondaryRateLimit(10, {}, {} as Octokit, 0);
});
});

0 comments on commit c4147c9

Please sign in to comment.