-
Notifications
You must be signed in to change notification settings - Fork 904
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
typescript definition #71
Comments
Hey. It's absolutely possible 👍 PR is highly welcome. |
And flowtype? |
Hey, what's the current status? Would like to use TypeScript with this lib :) |
Hey! I'm started to write .d.ts. After few days plan PR. |
Awesome. Looking forward to it.
… Am 19.06.2017 um 08:50 schrieb Denis Panfilov ***@***.***>:
Hey! I'm started to write .d.ts. After few days plan PR.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
I'm started working on typescript typings. https://github.com/sergeysova/telegraf/blob/typings/typings/telegraf.d.ts 2K lines of typings is ready now |
Any update on the current status of this issue? |
could we merge the work of @sergeysova to the main repo? |
@SoilChang @mRs- @flaticols @elementh @sagax85 Welcome to feature/typings branch PR: #245 |
how can i use this at the moment? |
@sajjad-ser I managed to get it to work by telling npm to fetch the branch directly from GitHub instead of the npm package in the package.json:
If you would like to see an example, you can check out my bot at https://github.com/Y0hy0h/secret-santa-bot/tree/typescript. |
Is it a good idea to port all of Telegraf to TypeScript? That way, the would be no way that the typings could mismatch the library. |
Full telegram bot types parsed and stored in telegram-typings https://github.com/sergeysova/telegram-typings/blob/master/javascript/index.d.ts |
Are there any examples of Telegraf bots using TypeScript? I'm having trouble setting it up. |
@y0hy0h If it helps, I'm working on one now |
Is there any way I can help in moving this forward? |
Guys, there is one bot which needs to be rewritten. syntax-highlighter-bot The structure smells fishy there for now, however, in the past it smelled stronger old-double-bot The old double bot was written by @CristianOspina and he is da shit (I mean a positive connotation) because that bot would be the good exhibit for the museum. I sure that functionality is a good idea to implement it with TS. I wonder the new structure would be similar to my template-bot:
I would be happy if you will try to write this code, @divyenduz @y0hy0h there is a way, unfortunately... Markup of that page is changing permanently and parser logic needs to be corrected from time to time. There is the initial version. As you could see the start code now is parsing only a small part. @GingerPlusPlus no need to worries, bro ;) |
Hi, guys, help! Probably, is there a missing type definition in index.d.ts file: p.s in js: class Telegraf extends Composer (it has such interface), I don't feel right till post about that, thank you! p.s update: ctx.reply accepts second argument as p.s update: Markup.inlineKeyboard(... , options) works pretty well with one argument, in my example CallbackButtons[] as Markup.inlineKeyboards(buttons), but it strictly requires and second argument 'options', does it make sense? Also Markup.callbackButton requires three arguments, but if I provide only two - it works, but it warns me that I didn't pass 'hidden: boolean(3)' flag (3 arg, maybe it's optional?),
also I can't import/use scene/stage, they missed in index.d.ts file |
all repositories has been removed, why? 😢 |
@thedevxen take a look |
@Piterden Ooops! I just saw today (because of the latest changes) for some reason that I got mentioned in that last comment. Is this work still to be done? Happy to pick that up if it is still there. |
@divyenduz sorry I don't understand what you are talking about |
This message has
I am sorry that missed it earlier, happy to help if this is still a task :) |
Is it possible to add in typescript definition for this library? It would make development much easier.
The text was updated successfully, but these errors were encountered: