Skip to content
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

feat: Re-export Bot API types #127

Closed
KnorpelSenf opened this issue Dec 8, 2021 · 0 comments · Fixed by #166
Closed

feat: Re-export Bot API types #127

KnorpelSenf opened this issue Dec 8, 2021 · 0 comments · Fixed by #166
Projects

Comments

@KnorpelSenf
Copy link
Member

KnorpelSenf commented Dec 8, 2021

They currently are exported from @grammyjs/types, so users have to have two explicit dependencies. This causes some trouble:

  • deps can get out of sync
  • especially bad on Deno because it always checks the entire project
  • not intuitive to install a second package, while the main one already uses the types
  • the InputFileProxy type is hard to understand

Implementing this has some disadvantages, too:

  • adds ~170 type exports to grammY (can be mitigated with a namespace), but still makes API surface much larger
  • API reference will now mix grammY's definitions with those of the Bot API
@KnorpelSenf KnorpelSenf added this to To do in Coding May 1, 2022
@KnorpelSenf KnorpelSenf moved this from To do to In progress in Coding May 14, 2022
@KnorpelSenf KnorpelSenf moved this from In progress to Review in progress in Coding May 14, 2022
KnorpelSenf added a commit to grammyjs/website that referenced this issue Jul 30, 2022
Coding automation moved this from Review in progress to Done Jul 31, 2022
roj1512 pushed a commit to grammyjs/website that referenced this issue Aug 1, 2022
* Document exported API types

grammyjs/grammY#127

* Update site/docs/guide/api.md

* feat: Add Spanish Translations

* fix: Fix a typo in English version

Co-authored-by: Habemuscode <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant