diff --git a/aiogram/types/__init__.py b/aiogram/types/__init__.py index 541f6ce8..5d9e5391 100644 --- a/aiogram/types/__init__.py +++ b/aiogram/types/__init__.py @@ -1,6 +1,17 @@ +import io as _io +from typing import TypeVar as _TypeVar + from . import base from . import fields __all__ = ( - 'base', 'fields' + 'base', 'fields', + 'InputFile', 'String', 'Integer', 'Float', 'Boolean' ) + +# Binding of builtin types +InputFile = _TypeVar('InputFile', _io.BytesIO, _io.FileIO, str) +String = _TypeVar('String', bound=str) +Integer = _TypeVar('Integer', bound=int) +Float = _TypeVar('Float', bound=float) +Boolean = _TypeVar('Boolean', bound=bool)