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

Typedef for Stripe.StripeResource #1011

Merged
merged 2 commits into from
Sep 24, 2020

Conversation

richardm-stripe
Copy link
Contributor

@richardm-stripe richardm-stripe commented Sep 21, 2020

Fixes #994
r? @jlomas-stripe
cc @stripe/api-libraries

We considered adding this for #920 but then opted not to, but per #994 this is not convenient for users. We could just expose any but why not try and get the types right?

The types in this PR are an approximation that reflect mostly the "public interface" of Stripe.StripeResource, and still use any a great deal, but it's a starting place.

@jlomas-stripe
Copy link
Contributor

Hey @richardm-stripe! I know I contributed a bunch to these initially but my TypeScript isn't that great; probably better to have someone else with more familiarity review. Sorry!

Copy link
Contributor

@paulasjes-stripe paulasjes-stripe left a comment

Choose a reason for hiding this comment

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

Looks good, but should we also include MAX_BUFFERED_REQUEST_METRICS since we've listed everything else on the StripeResource object?

@richardm-stripe
Copy link
Contributor Author

ptal @paulasjes-stripe
added MAX_BUFFERED_REQUEST_METRICS

@richardm-stripe richardm-stripe merged commit 15c6f8c into master Sep 24, 2020
@richardm-stripe richardm-stripe deleted the richardm-striperesource-types branch September 24, 2020 13:25
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.

Property 'StripeResource' does not exist on type 'Stripe'
3 participants