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

from __future__ import annotations
from typing import List, Union, Any
from .aio.client import Client as NATS

async def connect(servers: Union[str, List[str]] = ..., **options: Any) -> NATS:
    """
    :param servers: List of servers to connect.
    :param options: NATS connect options.

    ::

        import asyncio
        import nats

        async def main():
            # Connect to NATS Server.
            nc = await nats.connect('demo.nats.io')
            await nc.publish('foo', b'Hello World!')
            await nc.flush()
            await nc.close()

        if __name__ == '__main__':
            asyncio.run(main())

    """
    ...

