[node-telegram-bot-api] Mark several properties on the WebHookOptions interface as optional (#35218)

* Update WebHookOptions interface in response to #35206
* Set `key`, `cert` and `pfx` within the Webhook Options to be optional values, per issue #35206
* Update definition tests to test the new changes

* Resolve lint issues with chagnes to node-telegram-bot-api
This commit is contained in:
Alex Muench
2019-05-06 01:05:45 -07:00
committed by Wesley Wigham
parent aff3334118
commit 63cb9fea2c
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -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 <https://github.com/ammuench>
// Agadar <https://github.com/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;
@@ -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();