Skip to content

Commit 25bf33f

Browse files
committed
fix(typescript): define .defaults() method on rest endpoint method types
1 parent fd9271c commit 25bf33f

File tree

2 files changed

+560
-560
lines changed

2 files changed

+560
-560
lines changed

scripts/update-endpoints/types.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ async function generateTypes() {
6868
method.jsdoc,
6969
`${method.name}: {
7070
(params?: RestEndpointMethodTypes["${namespace.namespace}"]["${method.name}"]["parameters"]): Promise<RestEndpointMethodTypes["${namespace.namespace}"]["${method.name}"]["response"]>
71-
71+
defaults: RequestInterface["defaults"];
7272
endpoint: EndpointInterface<{ url: string }>;
7373
}`,
7474
].join("\n")
@@ -82,7 +82,7 @@ async function generateTypes() {
8282

8383
const methodTypesSource = prettier.format(
8484
[
85-
`import { EndpointInterface } from "@octokit/types";`,
85+
`import { EndpointInterface, RequestInterface } from "@octokit/types";`,
8686
`import { RestEndpointMethodTypes } from "./method-types";`,
8787
"",
8888
`export type RestEndpointMethods = {

0 commit comments

Comments
 (0)