Code Monkey home page Code Monkey logo

telegram-typings's Introduction

Telegram Bot API typings for Flow, TypeScript and Rust

Travis (.org) npm NPM npm

This repository contains Telegram Bot API typings for Flow, TypeScript and Rust.

The types are automatically generated for all supported languages from the Telegram Bot API website.

Flow and TypeScript typings

See javascript/ folder.

Rust typings

See rust folder.

Contributing

Source code for the type generation lives under lib/ folder.

Setting up local development environment

To contribute to this project, you will need to have the following tools installed:

  • Rust
  • Node v8.x or higher
  • npm v5.7.1 or higher

Once these tools are installed, you can install the required dependencies:

npm install
cargo install rustfmt --version 0.9.0

Generating new typings

To generate new types, run the following:

npm run build

If the Telegram Bot API documentation has not changed, and you haven't done any changes to code, you should not get any diff.

telegram-typings's People

Contributors

alchemicas avatar dependabot[bot] avatar fazendaaa avatar kidonng avatar kuznetsovgm avatar piterden avatar realpeha avatar sa68ru avatar sergeysova avatar valscion avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

telegram-typings's Issues

Thank you for this!

Hi!

I was just looking around whether anyone had created flowtype compatible types for Telegram Bot API and I stumbled upon this project.

It looks so amazing, and seems to work with the bot I'm currently writing!

Thank you for creating this ☺️. I'll see if I spot some strange cases with Flow and this package and see if I can contribute in any way

Have a great weekend!

Parse links in description

Links from description should be placed to comment into @see property.

Example: https://core.telegram.org/bots/api#forcereply

/**
  * Upon receiving a message with this object,
  * Telegram clients will display a reply interface to the user
  * (act as if the user has selected the bot‘s message and tapped ’Reply').
  * This can be extremely useful if you want to create user-friendly step-by-step
  * interfaces without having to sacrifice privacy mode.
  * @see https://core.telegram.org/bots#privacy-mode
  */
export type ForceReply = {
}

typescript не работает автодополнение

не работает автодополнение
и появляется ошибка при попытке считать свойство ctx.message.from
[ts] Type 'Message | undefined' has no property 'from' and no string index signature.

image

typescript 2.8.3
telegram-typings 3.6.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.