Skip to content

Commit

Permalink
Fix *openinvoice* method callback (#30)
Browse files Browse the repository at this point in the history
* Fix *openInvoice* method callback

* Bump version to 8.0.2
  • Loading branch information
DavisDmitry authored Nov 29, 2024
1 parent fee5b2d commit 26b98df
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "telegram-webapps",
"version": "8.0.1",
"version": "8.0.2",
"description": "Typings for Telegram Mini Apps",
"keywords": [
"telegram",
Expand Down
5 changes: 4 additions & 1 deletion src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -944,7 +944,10 @@ export declare namespace TelegramWebApps {
* *callback* parameter was passed, the *callback* function will be called and the
* invoice status will be passed as the first argument.
*/
openInvoice(url: string, callback?: InvoiceClosedEventHandler): void
openInvoice(
url: string,
callback?: (status: 'paid' | 'cancelled' | 'failed' | 'pending') => void
): void
/**
* `Bot API 7.8+` A method that opens the native story editor with the media specified
* in the *media_url* parameter as an HTTPS URL. An optional *params* argument of the
Expand Down

0 comments on commit 26b98df

Please sign in to comment.