Are types actually supported?
See original GitHub issueI wanted to use Telegram with TypeScript but it seems that typings are just wrong.
For example, Context
doesn’t have updateType
, updateSubTypes
, it doesn’t have update
as well, how am I supposed to get update object from API? No match
, state
, etc.
Maybe I miss something but it seems like types are incompatible with Telegraf docs and actually are pretty much useless because you have to use any
to access all properties from Context and other objects.
I mean, it’s easy to fix by extending Context interface but still, I guess that such big library could have better TypeScript support.
Issue Analytics
- State:
- Created 5 years ago
- Comments:15 (3 by maintainers)
Top Results From Across the Web
PostScript Type 1 fonts end of support - Adobe Support
Users will no longer have the ability to author content using Type 1 fonts after that time.
Read more >Support and Connection Types
The three common types of connections which join a built structure to its foundation are; roller, pinned and fixed. A fourth type, not...
Read more >MIME types (IANA media types) - HTTP - MDN Web Docs
Each type has its own set of possible subtypes. A MIME type always has both a type and a subtype, never just one...
Read more >Supporting Organizations - Requirements and Types - IRS
Supporting organizations are classified as Type I, Type II or Type III supporting organizations based on how they satisfy the relationship ...
Read more >What are type I and type II errors? - Minitab - Support
When you do a hypothesis test, two types of errors are possible: type I and ... you will be less likely to detect...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@tplk actually I just stopped using Telegraf and wrote my own library in TypeScript using interfaces, decorators and reflection. Example:
I also wrote Markup helpers for generating keyboard, passing data to callback buttons, etc. Sadly I can’t release it because it’s still in development, I created it because I just need it to develop another project and for me it’s already 100x times better than Telegraf (at least for TypeScript). Some time later I will release it I guess but for now it’s too early.
Seriously? Please stop whining and start contributing.
@SoundAsleep192 that is wrong.
This project is traditionally not a TypeScript project. I submitted #1108 three months ago that actually brings us up the the 75+ % TS, and typegram had to be published before we could do any meaningful stuff. The current version on npm is completely written in JS with a few manually created types to the side. This has nothing to do with “being written in TS”.
The code that fixes our problems is already pushed, but given that none of you guys bothers to review the respective pull requests (#1194, #1195, #1200, just to name the currently open ones) and confirming that they actually work, how do you think anyone of us will be able to benefit from the work behind it?
@skmohammadi it does exist. I submitted it. Can you please confirm that it works (so we can arrive in 2020)? #1194
@mfissehaye they are. @wojpawlik and I submitted them. If you are interested in them, can you then please review the above PRs and confirm that we can merge them?
My point is: People are investing their spare free time here, and taking that for granted while dropping snappy comments does in no way accelerate it. Joining in does.</outrage>
I’m looking forward to the contributions of you all! Please try out what is written, and provide feedback. This is essential. (Also, IMO it would be good to have more docs. What do you think?)