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

Narrower type for stripe.invoices.retrieveUpcoming() #1629

Merged
merged 5 commits into from Dec 1, 2022

Conversation

richardm-stripe
Copy link
Contributor

@richardm-stripe richardm-stripe commented Nov 30, 2022

Fixes #1500,
Fixes #1013

Makes stripe.invoices.retrieveUpcoming return Omit<Invoice, 'id'> instead of Invoice. This means that Invoice.id can now be required and should prevent some needless null checks.

Copy link
Contributor

@pakrym-stripe pakrym-stripe left a comment

Choose a reason for hiding this comment

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

Some questions.

types/UpcomingInvoices.d.ts Outdated Show resolved Hide resolved
types/test/typescriptTest.ts Show resolved Hide resolved
@richardm-stripe richardm-stripe merged commit 247c35e into master Dec 1, 2022
7 checks passed
@richardm-stripe richardm-stripe deleted the richardm-upcoming-invoice-narrower-type branch December 7, 2022 10: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.

Invoice.id is shouldn't be optional invoices.retrieveUpcoming return type incorrect
2 participants