From 3bfa9599eacf42b13d499fcb8ecbe53475a2d84b Mon Sep 17 00:00:00 2001 From: Gregor Martynus <39992+gr2m@users.noreply.github.com> Date: Wed, 17 Mar 2021 09:35:21 -0700 Subject: [PATCH 1/2] docs(README): Types --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index f230319..b1fe883 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ See [GitHub’s Developer Guide for the OAuth App web application flow](https:// - [For GitHub Apps](#for-github-apps) - [Options](#options) - [Result](#result) +- [Types](#types) - [License](#license) @@ -263,6 +264,16 @@ Returns an array of strings. Returns options.scopes if it was set a +## Types + +```ts +import { ClientType, Options, Result } from "@octokit/oauth-authorization-url"; +``` + +- `ClientType` is a union of `"oauth-app"` and `"github-app"` +- `Options<"oauth-app">` returns types for OAuth Apps Options. `Options<"github-app">` returns types for GitHub Apps Options. +- `Result<"oauth-app">` returns types for OAuth Apps Result object. `Result<"github-app">` returns types for GitHub Apps Result object. + ## License [MIT](LICENSE) From dd4140563eb1885d10dd7e616b9873e9d09ed97b Mon Sep 17 00:00:00 2001 From: Gregor Martynus <39992+gr2m@users.noreply.github.com> Date: Wed, 17 Mar 2021 09:35:47 -0700 Subject: [PATCH 2/2] feat(typescript): export `ClientType`, `Options`, and `Result` --- src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/index.ts b/src/index.ts index 45712d2..033cda7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,5 @@ import { ClientType, Options, Result } from "./types"; +export { ClientType, Options, Result } from "./types"; export function oauthAuthorizationUrl< TClientType extends ClientType = "oauth-app"