diff --git a/types/node-telegram-bot-api/index.d.ts b/types/node-telegram-bot-api/index.d.ts index d16fd490df..8cfd494d31 100644 --- a/types/node-telegram-bot-api/index.d.ts +++ b/types/node-telegram-bot-api/index.d.ts @@ -1,4 +1,4 @@ -// Type definitions for node-telegram-bot-api 0.30 +// Type definitions for node-telegram-bot-api 0.31 // Project: https://github.com/yagop/node-telegram-bot-api // Definitions by: Alex Muench // Agadar @@ -78,9 +78,9 @@ declare namespace TelegramBot { interface WebHookOptions { host?: string; port?: number; - key: string; - cert: string; - pfx: string; + key?: string; + cert?: string; + pfx?: string; autoOpen?: boolean; https?: ServerOptions; healthEndpoint?: string; diff --git a/types/node-telegram-bot-api/node-telegram-bot-api-tests.ts b/types/node-telegram-bot-api/node-telegram-bot-api-tests.ts index b2d7cea2e6..61f1589f6f 100644 --- a/types/node-telegram-bot-api/node-telegram-bot-api-tests.ts +++ b/types/node-telegram-bot-api/node-telegram-bot-api-tests.ts @@ -1,6 +1,6 @@ import TelegramBot = require('node-telegram-bot-api'); -const MyTelegramBot = new TelegramBot('token'); +const MyTelegramBot = new TelegramBot('token', { webHook: { host: 'myhost'}}); MyTelegramBot.startPolling({restart: true}); MyTelegramBot.stopPolling();