From 76a2aaea7b52f98efdb46efc62989beb37bf6e15 Mon Sep 17 00:00:00 2001 From: Roman Anasal Date: Fri, 8 Feb 2019 17:09:05 +0100 Subject: [PATCH] Added section about TypeScript support to README --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index 72af4c8..15fbcde 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,20 @@ api.getMe() }); ``` +## TypeScript support + +This package comes with type declarations included and is ready to be used in TypeScript projects too: + +```typescript +import TelegramBotApi from 'telegram-bot-api'; + +let api = new TelegramBotApi({ + token: '' +}); +``` + +Supporting editors will then show available autocompletions and type annotations and type check your code. + ## Supported methods For method parameters and description, please refer to official documentation