grammy 1.8.2 → 1.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/composer.d.ts +4 -4
- package/out/core/client.d.ts +1 -2
- package/out/platform.node.d.ts +1 -1
- package/package.json +1 -1
package/out/composer.d.ts
CHANGED
|
@@ -553,10 +553,10 @@ export declare class Composer<C extends Context> implements MiddlewareObj<C> {
|
|
|
553
553
|
*/
|
|
554
554
|
errorBoundary(errorHandler: (error: BotError<C>, next: NextFunction) => MaybePromise<unknown>, ...middleware: Array<Middleware<C>>): Composer<C>;
|
|
555
555
|
}
|
|
556
|
-
declare type HearsContext<C extends Context> = Filter<C & {
|
|
557
|
-
match: string | RegExpMatchArray
|
|
556
|
+
declare type HearsContext<C extends Context> = Filter<Omit<C, "match"> & {
|
|
557
|
+
match: Extract<C["match"], string | RegExpMatchArray>;
|
|
558
558
|
}, ":text" | ":caption">;
|
|
559
|
-
declare type CommandContext<C extends Context> = Filter<C & {
|
|
560
|
-
match: string
|
|
559
|
+
declare type CommandContext<C extends Context> = Filter<Omit<C, "match"> & {
|
|
560
|
+
match: Extract<C["match"], string>;
|
|
561
561
|
}, ":entities:bot_command">;
|
|
562
562
|
export {};
|
package/out/core/client.d.ts
CHANGED
|
@@ -23,8 +23,7 @@ export interface WebhookReplyEnvelope {
|
|
|
23
23
|
* Type of a function that can perform an API call. Used for Transformers.
|
|
24
24
|
*/
|
|
25
25
|
export declare type ApiCallFn<R extends RawApi = RawApi> = <M extends Methods<R>>(method: M, payload: Payload<M, R>, signal?: AbortSignal) => Promise<ApiResponse<ApiCallResult<M, R>>>;
|
|
26
|
-
declare type ApiCallResult<M extends Methods<R>, R extends RawApi> = R[M] extends (...args: unknown[]) => unknown ?
|
|
27
|
-
declare type Await<T> = T extends PromiseLike<infer V> ? V : T;
|
|
26
|
+
declare type ApiCallResult<M extends Methods<R>, R extends RawApi> = R[M] extends (...args: unknown[]) => unknown ? Awaited<ReturnType<R[M]>> : never;
|
|
28
27
|
/**
|
|
29
28
|
* API call transformers are functions that can access and modify the method and
|
|
30
29
|
* payload of an API call on the fly. This can be useful if you want to
|
package/out/platform.node.d.ts
CHANGED
|
@@ -22,7 +22,7 @@ export declare function baseFetchConfig(apiRoot: string): {
|
|
|
22
22
|
/** Something that looks like a URL. */
|
|
23
23
|
interface URLLike {
|
|
24
24
|
/**
|
|
25
|
-
* Identifier of the
|
|
25
|
+
* Identifier of the resource. Must be in a format that can be parsed by the
|
|
26
26
|
* URL constructor.
|
|
27
27
|
*/
|
|
28
28
|
url: string;
|