Skip to content

Commit 318e6fd

Browse files
authored
fix(types): export minimal types required for the App class (#536)
This resolves issues in consumers of this package getting errors from TypeScript ``` The inferred type of 'App' cannot be named without a reference to '../node_modules/@octokit/app/dist-types/types.js'. This is likely not portable. A type annotation is necessary. ```
1 parent ea347ff commit 318e6fd

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/index.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ import type {
1010
EachRepositoryInterface,
1111
GetInstallationOctokitInterface,
1212
} from "./types.js";
13+
14+
// Export types required for the App class
15+
// This is in order to fix a TypeScript error in downstream projects:
16+
// The inferred type of 'App' cannot be named without a reference to '../node_modules/@octokit/app/dist-types/types.js'. This is likely not portable. A type annotation is necessary.
17+
export type {
18+
EachInstallationInterface,
19+
EachRepositoryInterface,
20+
GetInstallationOctokitInterface,
21+
} from "./types.js";
22+
1323
import { VERSION } from "./version.js";
1424
import { webhooks } from "./webhooks.js";
1525
import { eachInstallationFactory } from "./each-installation.js";

0 commit comments

Comments
 (0)