Skip to content

Commit

Permalink
chore: remove SupportedFrameworks
Browse files Browse the repository at this point in the history
  • Loading branch information
winstxnhdw committed May 14, 2024
1 parent 4a37cff commit 3b4d2e2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
6 changes: 0 additions & 6 deletions src/convenience/frameworks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,6 @@ const unauthorized = () =>
statusText: WRONG_TOKEN_ERROR,
});

/**
* HTTP Web frameworks for which grammY provides compatible callback out of the
* box.
*/
export type SupportedFrameworks = keyof typeof adapters;

/**
* Abstraction over a request-response cycle, providing access to the update, as
* well as a mechanism for responding to the request and to end it.
Expand Down
3 changes: 1 addition & 2 deletions src/convenience/webhook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { type Update } from "../types.ts";
import {
adapters as nativeAdapters,
type FrameworkAdapter,
type SupportedFrameworks,
} from "./frameworks.ts";
const debugErr = d("grammy:error");

Expand Down Expand Up @@ -78,7 +77,7 @@ export function webhookCallback<
: NonNullable<ReturnType<typeof nativeAdapters[A]>["handlerReturn"]>;
export function webhookCallback<C extends Context = Context>(
bot: Bot<C>,
adapter: SupportedFrameworks | FrameworkAdapter = defaultAdapter,
adapter: keyof typeof nativeAdapters | FrameworkAdapter = defaultAdapter,
onTimeout:
| WebhookOptions
| WebhookOptions["onTimeout"] = "throw",
Expand Down

0 comments on commit 3b4d2e2

Please sign in to comment.