telegram-webapps-types-new
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -1,3 +0,1 @@ | ||
type ReverseMap<T> = T[keyof T]; | ||
export declare namespace TelegramWebApps { | ||
@@ -8,3 +6,3 @@ interface SDK { | ||
type EventType = 'themeChanged' | 'viewportChanged' | 'mainButtonClicked' | 'backButtonClicked' | 'settingsButtonClicked' | 'invoiceClosed'; | ||
type EventType = "themeChanged" | "viewportChanged" | "mainButtonClicked" | "backButtonClicked" | "settingsButtonClicked" | "invoiceClosed" | "popupClosed" | "qrTextReceived" | "qrTextReceived" | "clipboardTextReceived"; | ||
@@ -113,5 +111,9 @@ interface WebApp { | ||
* The Web App will not be closed. | ||
* | ||
* Bot API 6.4+ | ||
* If the optional options parameter is passed with the field try_instant_view=true, the link will be opened in Instant View mode if possible. | ||
* | ||
* Note that this method can be called only in response to the user interaction with the Web App interface (e.g. click inside the Web App or on the main button) | ||
*/ | ||
openLink(url: string): void; | ||
openLink(url: string, options?: openLinkOptions): void; | ||
/** | ||
@@ -518,2 +520,6 @@ * A method that opens a telegram link inside Telegram app. | ||
} | ||
interface openLinkOptions { | ||
try_instant_view?: Boolean; | ||
} | ||
@@ -520,0 +526,0 @@ } |
{ | ||
"name": "telegram-webapps-types-new", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "TypeScript typings for Telegram Web Apps for Bots. See https://core.telegram.org/bots/webapps", | ||
@@ -5,0 +5,0 @@ "scripts": { |
20335
510