Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,16 @@ The TypeScript types in stripe-node always reflect the latest shape of the Strip

Please feel welcome to share your thoughts about the versioning policy in a Github issue. For now, we judge it to be better than the two alternatives: outdated, inaccurate types, or vastly more frequent major releases, which would distract from any future breaking changes with potentially more disruptive runtime implications.

### Open and Closed Enum

Many of Stripe API enums are open, meaning Stripe may add new values even on older API versions.
To reflect this, open enum fields in TypeScript include a string type (via `OtherString`) in addition to the known literal values.
This ensures the field has the correct type for both values known at SDK release time and other values that may be added later.

A small number of enums are closed, meaning Stripe guarantees no new values will be added without an API version change.

Refer to the [API Reference](https://docs.stripe.com) for the latest set of allowed values.

### Using Promises

Every method returns a chainable promise which can be used instead of a regular
Expand Down
Loading