telegraf / telegraf

Modern Telegram Bot Framework for Node.js
https://telegraf.js.org
MIT License
8.25k stars 928 forks source link

Typescript submodules typings #506

Closed xrei closed 5 years ago

xrei commented 6 years ago

There is no typings for such classess as Markup, Scene, Session, etc. So how do i declare them without ruinning Telegraf typings ?

I've made telegraf.d.ts and declared them there, but ts still warns me about there is no such module. This is happening only when i'm also declaring telegraf to extend its interfaces to add props as scene and whatever else.

Any options how to make it right?

externuz commented 5 years ago

import Telegraf, { Extra } from "telegraf";