这是indexloc提供的服务,不要输入任何密码
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions types/telegram-web-app/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,13 @@ export interface WebApp {
* called and the invoice status will be passed as the first argument.
*/
openInvoice(url: string, callback: (status: "paid" | "cancelled" | "failed" | "pending") => void): void;
/**
* Bot API 9.1+
*
* A method that hides the on-screen keyboard, if it is currently visible.
* Does nothing if the keyboard is not active.
*/
hideKeyboard(): void;
/**
* A method that shows a native popup described by the params argument of
* the type PopupParams. The Web App will receive the event popupClosed when
Expand Down
2 changes: 1 addition & 1 deletion types/telegram-web-app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"private": true,
"name": "@types/telegram-web-app",
"version": "9.0.9999",
"version": "9.1.9999",
"nonNpm": "conflict",
"nonNpmDescription": "telegram-web-app",
"projects": ["https://telegram.org/js/telegram-web-app.js"],
Expand Down
2 changes: 2 additions & 0 deletions types/telegram-web-app/telegram-web-app-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ app.onEvent("viewportChanged", (e) => {
else console.log("Changing, currently at ", app.viewportHeight);
});

app.hideKeyboard();

app.showPopup(
{
message: "Hello",
Expand Down