Telegram Types
Full Typescript classes for Telegram bot api
With serialization to and from json. With serialization to FormData. Only one dependency.
Auto generated by telegram-types-generator
Install
npm install telegram-bot-ts-types
or
yarn add telegram-bot-ts-types
Usage
; new User;
Example Serializer
; ; ; console.logchat; /* Will printChat { _id: 123, _type: 'private', _title: null, _username: 'username', _firstName: 'Name', _lastName: null, _photo: null, _description: null, _inviteLink: null, _pinnedMessage: null, _permissions: null, _slowModeDelay: null, _stickerSetName: null, _canSetStickerSet: null}*/ console.logchat instanceof Chat; // Will print true ;console.logjsonChat; // Will print {"id":123,"type":"private","username":"username","first_name":"Name"}