You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ERROR in D:/myproject/node_modules/telegram-webapps-types/dist/index.d.ts(60,14):
60:14 Parameter 'data' implicitly has an 'any' type.
58 | * A method used to send data to the bot.
59 | */
> 60 | sendData(data): void;
| ^
61 | /**
62 | * A method that informs the Telegram app that the Web App is ready to be displayed.
63 | */
Version: typescript 3.9.9
WebApp.sendData = function (data) {
if (!data || !data.length) {
console.error('[Telegram.WebApp] Data is required', data);
throw Error('WebAppDataInvalid');
}
if (byteLength(data) > 4096) {
console.error('[Telegram.WebApp] Data is too long', data);
throw Error('WebAppDataInvalid');
}
WebView.postEvent('web_app_data_send', false, {data: data});
};
Probably
data
argument should be type ofWebAppData
(https://core.telegram.org/bots/api#webappdata)The text was updated successfully, but these errors were encountered: