fix(types): align request middleware typing with actual return value

Refs: #1723
This commit is contained in:
vmphase 2026-01-10 17:01:49 +02:00
parent ec7da0f678
commit 00026a29f5
4 changed files with 10 additions and 10 deletions

View file

@ -35,7 +35,7 @@ Register using decorator
make_request: NextRequestMiddlewareType[TelegramType],
bot: "Bot",
method: TelegramMethod[TelegramType],
) -> Response[TelegramType]:
) -> TelegramType:
# do something with request
return await make_request(bot, method)
@ -67,7 +67,7 @@ Function based session middleware
make_request: NextRequestMiddlewareType[TelegramType],
bot: "Bot",
method: TelegramMethod[TelegramType],
) -> Response[TelegramType]:
) -> TelegramType:
try:
# do something with request
return await make_request(bot, method)