"""
This type stub file was generated by pyright.
"""

import typing as t

from starlette.types import ASGIApp, Receive, Scope, Send

Lifespan = t.Callable[[t.Any], t.AsyncContextManager[t.Any]]

class LifespanMiddleware:
    """
    Middleware that adds support for Starlette lifespan handlers
    (https://www.starlette.io/lifespan/).
    """

    def __init__(
        self, next_app: ASGIApp, *, lifespan: t.Optional[Lifespan]
    ) -> None: ...
    async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None: ...

__all__ = ("t", "ASGIApp", "Receive", "Scope", "Send", "Lifespan", "LifespanMiddleware")
