Skip to content

Commit 8c33742

Browse files
authored
feat(typescript): export ClientType, Options, and Result (#131)
1 parent ef85182 commit 8c33742

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ See [GitHub’s Developer Guide for the OAuth App web application flow](https://
1414
- [For GitHub Apps](#for-github-apps)
1515
- [Options](#options)
1616
- [Result](#result)
17+
- [Types](#types)
1718
- [License](#license)
1819

1920
<!-- tocstop -->
@@ -263,6 +264,16 @@ Returns an array of strings. Returns <code>options.scopes</code> if it was set a
263264
</tbody>
264265
</table>
265266

267+
## Types
268+
269+
```ts
270+
import { ClientType, Options, Result } from "@octokit/oauth-authorization-url";
271+
```
272+
273+
- `ClientType` is a union of `"oauth-app"` and `"github-app"`
274+
- `Options<"oauth-app">` returns types for OAuth Apps Options. `Options<"github-app">` returns types for GitHub Apps Options.
275+
- `Result<"oauth-app">` returns types for OAuth Apps Result object. `Result<"github-app">` returns types for GitHub Apps Result object.
276+
266277
## License
267278

268279
[MIT](LICENSE)

src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { ClientType, Options, Result } from "./types";
2+
export { ClientType, Options, Result } from "./types";
23

34
export function oauthAuthorizationUrl<
45
TClientType extends ClientType = "oauth-app"

0 commit comments

Comments
 (0)