Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

telegram-typings

sergeysova8.1kMIT5.0.0TypeScript support: included

Telegram typings for TypeScript and Flowtype to create bots

telegram, bots, typings, types, flow, type, typescript, script, build, generate

readme

telegram-typings

Full types parsed from core.telegram.org/bots/api for TypeScript and Flowtype

Installation

Just install it as your dependency and use

npm install --save telegram-typings
// typescript
import { User, Chat, Voice } from 'telegram-typings'

Flow

# Search in flow-typed
flow-typed search telegram-typings

# if not found, copy content of ./javascript/index.js.flow to your flow-typed
wget https://raw.githubusercontent.com/sergeysova/telegram-typings/master/javascript/index.js.flow -O ./flow-typed/npm/telegram-typings_vx.x.x.js
# next use as normal module
// flow
import type { User, Chat, Voice } from 'telegram-typings'

changelog

4.0.0-beta (2018-08-02)

Bug Fixes

  • Bug in parser, breaking type generation (ef317f1)
  • Output correct Rust types by skipping method serialization for now (c0f87e5)

Features

  • Add InputFile manually (c42fa60)
  • Add missing union types manually (90b7d82)
  • Add raw support for parsing union types (fa7cb8b)
  • Parse methods as interfaces (edb35b0)
  • Write method payloads as type aliases for Flowtype (3b64acf)
  • Write out methods for Flow using function declaration types (1fb3520)
  • main: fetch new version (756092a)

3.6.1 (2018-05-04)

Bug Fixes

  • install changelog generation (e545cd5)

Features

  • main: upgrade dependencies (8a2e40c)

3.6.0 (2018-04-18)

Features

0.3.5-4 (2018-01-26)

Bug Fixes

  • @rust: ignore rust from eslint (d2bd6d0)
  • builders: Rust building with enums (57299d0)
  • builders/flow: issues of new version of babel/types (9fbe7a1)
  • builders/rust: add stub for rust-keywords (af986f7)
  • builders/rust: Refactor to fix flow (4395f5a)
  • builders/rust: Resolve rust keywords (5e24d8c)

Features

  • builder/rust: Add simple Rust builder (c53e283)
  • builders/rust: Complete rust building (004da7d)
  • flow-builder: Build flow types as declare modules (c443055)
  • rust: Bump version to 3.5.1 (7d0182d)

0.3.5-1 (2017-12-27)

Features