Documentation
    Preparing search index...

    Interface IEnvironment

    Represents the client environment in which the application is running.

    interface IEnvironment {
        getBrowser(): string;
        getClientEnvironment(): string & {} | "web" | "miniapp";
        getLocale(): string;
        getPlatform(): string;
        getTelegramUser(): undefined | TelegramUser;
    }
    Index

    Methods

    • Retrieves the name or identifier of the user's browser.

      Returns string

    • Retrieves the type of client environment. Indicates whether the client is running as a web application, Telegram Mini App, or another custom environment.

      Returns string & {} | "web" | "miniapp"

    • Retrieves the user's current locale setting.

      Returns string

    • Retrieves the name of the user's operating system or platform.

      Returns string

    • Retrieves the Telegram user associated with the current environment, if available.

      Returns undefined | TelegramUser