"""Type stubs for contractme library."""

from typing import Callable, TypeVar, Any, overload
from typing_extensions import ParamSpec

F = TypeVar("F", bound=Callable[..., Any])
P = ParamSpec("P")
R = TypeVar("R")

@overload
def precondition(
    condition: Callable[[Any], bool],
) -> Callable[[Callable[P, R]], Callable[P, R]]: ...
@overload
def precondition(
    condition: Callable[[Any], bool], str
) -> Callable[[Callable[P, R]], Callable[P, R]]: ...
@overload
def precondition(condition: Callable[P, bool]) -> Callable[[Callable[P, R]], Callable[P, R]]: ...
@overload
def precondition(
    condition: Callable[P, bool], str
) -> Callable[[Callable[P, R]], Callable[P, R]]: ...
@overload
def precondition(
    condition: Callable[..., bool],
) -> Callable[[Callable[..., R]], Callable[..., R]]: ...
@overload
def precondition(
    condition: Callable[..., bool], str
) -> Callable[[Callable[..., R]], Callable[..., R]]: ...
@overload
def postcondition(
    condition: Callable[[Any], bool],
) -> Callable[[Callable[P, R]], Callable[P, R]]: ...
@overload
def postcondition(
    condition: Callable[[Any], bool], str
) -> Callable[[Callable[P, R]], Callable[P, R]]: ...
@overload
def postcondition(
    condition: Callable[[Any, Any], bool],
) -> Callable[[Callable[P, R]], Callable[P, R]]: ...
@overload
def postcondition(
    condition: Callable[[Any, Any], bool], str
) -> Callable[[Callable[P, R]], Callable[P, R]]: ...
@overload
def postcondition(
    condition: Callable[..., bool],
) -> Callable[[Callable[..., R]], Callable[..., R]]: ...
@overload
def postcondition(
    condition: Callable[..., bool], str
) -> Callable[[Callable[..., R]], Callable[..., R]]: ...
