2 ms·
It’s an expressive type system, but ime it allows developers to go crazy on type interdependencies and general entanglement, so you can’t just go to the “header
by wruza 4y ago
It’s an expressive type system, but ime it allows developers to go crazy on type interdependencies and general entanglement, so you can’t just go to the “header” and quickly figure out what your method or a return value really is, despite TS has structural typing.
E.g. look at this: https://github.com/telegraf/telegraf/blob/v4/src/telegram-types.ts https://github.com/telegraf/telegraf/blob/v4/src/telegram-ty...
- atwood22 4y agoThat's definitely overwhelming. After reading it for 5 minutes though, there is a type called Telegram and it has a field called 'Opts' that has a lot of different fields. MakeExtra lets you take a type from 'Opts' and exclude certain parameters. Probably do something like "you can set the chat message contents, but you can't set the chat id"