Skip to content

VityaSchel/mtproto-core-typescript-codegen

Repository files navigation

Telegram Core API (MTProto) types generator for @mtproto/core npm package

Types definitions generator for https://mtproto-core.js.org/.

Made for DefinitelyTyped/DefinitelyTyped#63089

Features

  • Methods (params and results)
  • Constuctors
  • Interfaces
  • Human-friendly description of interfaces params (TODO: scrape from https://core.telegram.org/ docs)

Usage

npm run build && npm run start

It downloads latest schema from https://core.telegram.org/schema/json, parses it and converts to TypeScript definitions. Then it writes result to '../index.d.ts' file (this project is intended to be used inside DefinitelyTyped_repository/types/mtproto__core/codegen/ directory).

License

MIT

Project structure auto-generated by Scaffold.