#AustinDidierTran-typescript-types
1 messages · Page 1 of 1 (latest)
And when you say "documentation of all the types that are available in typescript", can you elaborate? Do you mean the types of the return/input values?
Yes. For example, when I run this line: await stripe.reporting.reportTypes.retrieve(type)., it would be nice to use typesript to make sure the provided argument is allowed through an enum.
I know there is some types as I am using some that I've found in some code examples online, but I couldn;t find the documentation
Are you looking for something beyond the types mentioned in the docs you linked?
Return value types are specified at the end of most sections as well
Yes I want beyond that
I'll find you an example
import * as Stripe from 'stripe';
export const stripe = new Stripe('whateverkey');
function createHeader(): Stripe.HeaderOptions { // use stripe types for return type
return 'stripe header';
}
Stripe.HeaderOptions is the kind of types that I'm looking for
Ahhh okay. Let me check with a colleague
And you just want a master list of all the types?
Or rather, docs with a masterlist of all the types?
Aside from the docs mentioned in that StackOverflow thread you posted, you could also look here for types and their compositions? https://github.com/stripe/stripe-node/tree/master/types/2020-08-27
Unfortunately there are no docs that go into further detail