Add a route to the blueprint.

        This is designed to be used as a decorator, and has the same arguments
        as :meth:`~quart.Quart.route`. An example usage,

        .. code-block:: python

            blueprint = Blueprint(__name__)
            @blueprint.route('/')
            def route():
                ...

def route(
            self,
            path: str,
            methods: Optional[List[str]]=None,
            endpoint: Optional[str]=None,
            defaults: Optional[dict]=None,
            host: Optional[str]=None,
            subdomain: Optional[str]=None,
            *,
            provide_automatic_options: Optional[bool]=None,
            strict_slashes: bool=True,
    ) -> Callable:
        """Add a route to the blueprint.

        This is designed to be used as a decorator, and has the same arguments
        as :meth:`~quart.Quart.route`. An example usage,

        .. code-block:: python

            blueprint = Blueprint(__name__)
            @blueprint.route('/')
            def route():
                ...
        """
        def decorator(func: Callable) -> Callable:
            self.add_url_rule(
                path, endpoint, func, methods, defaults=defaults, host=host, subdomain=subdomain,
                provide_automatic_options=provide_automatic_options, strict_slashes=strict_slashes,
            )
            return func
        return decorator