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: ApiConstants type and DEFAULT_UPDATE_TYPES #453

Closed
wants to merge 10 commits into from

Conversation

roziscoding
Copy link
Contributor

export the DEFAULT_UPDATE_TYPES constant and the ApiConstants
type from the src/convenience/constants.ts

export the `DEFAULT_UPDATE_TYPES` constant and the `ApiConstants`
type from the `src/convenience/constants.ts`
@codecov
Copy link

codecov bot commented Jun 29, 2023

Codecov Report

Patch coverage: 66.66% and project coverage change: -0.02% ⚠️

Comparison is base (08b0241) 46.39% compared to head (9d7698b) 46.38%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #453      +/-   ##
==========================================
- Coverage   46.39%   46.38%   -0.02%     
==========================================
  Files          19       19              
  Lines        5610     5612       +2     
  Branches      222      224       +2     
==========================================
  Hits         2603     2603              
- Misses       3004     3006       +2     
  Partials        3        3              
Files Changed Coverage Δ
src/context.ts 23.93% <0.00%> (+0.01%) ⬆️
src/convenience/constants.ts 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

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

Copy link
Member

@KnorpelSenf KnorpelSenf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also perform https://t.me/grammyjs/146352

Copy link
Member

@KnorpelSenf KnorpelSenf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm still not quite happy with the lack of docs. See https://doc.deno.land/https://raw.githubusercontent.com/grammyjs/grammY/b4a7d41f39fa4611726aad1f8a2fc229431428e5/src/convenience/constants.ts. If you deem fixing this out of scope for this PQ, then we can postpone it. What do you think?

@roziscoding
Copy link
Contributor Author

roziscoding commented Jun 30, 2023

I'm still not quite happy with the lack of docs. See https://doc.deno.land/https://raw.githubusercontent.com/grammyjs/grammY/b4a7d41f39fa4611726aad1f8a2fc229431428e5/src/convenience/constants.ts.

That's weird. deno doc displays the name of the properties inside the object:

image

If you deem fixing this out of scope for this PQ, then we can postpone it. What do you think?

I think it can be the same PQ

@rojvv
Copy link
Member

rojvv commented Jun 30, 2023

@KnorpelSenf Remove the co-authors from the description before merging.

@roziscoding
Copy link
Contributor Author

I'm still not quite happy with the lack of docs.

Any ideas on how we could solve this?

@KnorpelSenf
Copy link
Member

Perhaps by extracting the docs into an interface and adding a type annotation to the variable. Hopefully, it doesn't have to be exported. Perhaps we must export it but not from mod.ts. Perhaps we just have to export it. You'll need to try.

@roziscoding
Copy link
Contributor Author

Perhaps by extracting the docs into an interface and adding a type annotation to the variable.
This does generate the docs for the interface but...

Hopefully, it doesn't have to be exported.

It does

Perhaps we just have to export it.

This seemed to work:

image

@roziscoding
Copy link
Contributor Author

Yep, exporting the interface works

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

3 participants