Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

typegram

Package Overview
Dependencies
Maintainers
1
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

typegram

Type declarations for the Telegram API

  • 1.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.3K
decreased by-63.63%
Maintainers
1
Weekly downloads
 
Created
Source

Types for the Telegram API

This project provides TypeScript types for the entire Telegram API in version 4.9 which was released on June 4, 2020.

Good to know

  • Generally this package just exposes a huge load of interfaces as well as a single class Telegram which contains all available methods of the API. There is no further structure applied to this, but if you can come up with something reasonable, please suggest it in an issue or directly open a PR.

  • All of the methods are specified with the actual return type of the Telegram API. If you need them to return Promises instead, consider using TelegramP. This type maps all methods of Telegram to a promisified version.

  • Each method takes just a single argument with a structure that corresponds to the object expected by Telegram. If you need to directly access that type, consider using Opts<M> where M is the method name (e.g. Opts<'getMe'>).

Where do the types come from

They're handwritten.

That is, they're of course not entirely handwritten. The initial version of them were produced in one afternoon by a combination of copying and pasting from the website, VIM magic, regular expressions and VSCode auto-formatting the rest.

Previous attempts to harvest them directly from the website with a script failed due to the required effort of handling special cases about the layout of the website.

Future updates to the API will be integrated manually in a similar fashion.

FAQs

Package last updated on 23 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc