KnorpelSenf / typegram

TypeScript types for the entire Telegram Bot API
MIT License
122 stars 3 forks source link

Distinguish between types and return types #2

Closed KnorpelSenf closed 4 years ago

KnorpelSenf commented 4 years ago

Some properties are "returned only in getChat" or "...getMe". They should be moved from the base interfaces and put only in the return value they're present in.

Example:

interface User { /* ... */ } // e.g. used in interface ChatMember
interface GottenUser extends User { /* ... */ } // used exclusively in getMe
wojpawlik commented 4 years ago

I don't like the GottenUser name, how about User_getMe and Chat_getChat?

Also, how about adding is_bot: True to User_getMe?

KnorpelSenf commented 4 years ago

I agree that GottenUser is weird, but let's stay with CamelCasing.

Also, how about adding is_bot: True to User_getMe?

That sounds good