massive update, probably broken
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-pyright / node_modules / pyright / dist / typeshed-fallback / stubs / first / first.pyi
1 from typing import Any, Callable, Iterable, TypeVar, overload
2
3 _T = TypeVar("_T")
4 _S = TypeVar("_S")
5
6 @overload
7 def first(iterable: Iterable[_T]) -> _T | None: ...
8 @overload
9 def first(iterable: Iterable[_T], default: _S) -> _T | _S: ...
10 @overload
11 def first(iterable: Iterable[_T], default: _S, key: Callable[[_T], Any] | None) -> _T | _S: ...
12 @overload
13 def first(iterable: Iterable[_T], *, key: Callable[[_T], Any] | None) -> _T | None: ...