mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 04:50:18 +00:00
[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:
committed by
Wesley Wigham
parent
aff3334118
commit
63cb9fea2c
+4
-4
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user