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: add types and improved docs for API_CONSTANTS #485

Merged
merged 5 commits into from
Sep 9, 2023

Conversation

KnorpelSenf
Copy link
Member

Exports DEFAULT_UPDATE_TYPES from grammY.

Exports a new interface ApiConstants which provides types for API_CONSTANTS.

Closes #453 which has several problems:

  • it provides two very similar interfaces called ApiConstants and API_CONSTANTS which is maximally confusing
  • one of the two interfaces is not documented at all, but it is the more useful one
  • there is no link from the values to the types in the generated Deno module docs

This PQ fixes all of that.

KnorpelSenf and others added 3 commits September 9, 2023 20:50
export the `DEFAULT_UPDATE_TYPES` constant and the `ApiConstants`
type from the `src/convenience/constants.ts`
@codecov
Copy link

codecov bot commented Sep 9, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.11% 🎉

Comparison is base (5a0064d) 46.40% compared to head (9abf868) 46.51%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #485      +/-   ##
==========================================
+ Coverage   46.40%   46.51%   +0.11%     
==========================================
  Files          19       19              
  Lines        5620     5615       -5     
  Branches      224      226       +2     
==========================================
+ Hits         2608     2612       +4     
+ Misses       3009     3000       -9     
  Partials        3        3              
Files Changed Coverage Δ
src/context.ts 24.55% <100.00%> (+0.63%) ⬆️
src/convenience/constants.ts 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@KnorpelSenf KnorpelSenf merged commit 91b3c8c into main Sep 9, 2023
8 checks passed
@KnorpelSenf KnorpelSenf deleted the constant-types branch September 9, 2023 21:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants