Skip to content

Commit

Permalink
Small typo fixes (#743)
Browse files Browse the repository at this point in the history
* Correct "eg;" to "e.g.,"

* Fix typo
  • Loading branch information
rattrayalex-stripe authored Dec 24, 2019
1 parent d96a741 commit 118ec3b
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,13 @@ createCustomer();

#### Using old API versions with TypeScript

Types can change between API versions (eg; Stripe may have changed a field from a string to a hash),
Types can change between API versions (e.g., Stripe may have changed a field from a string to a hash),
so our types only reflect the latest API version.

We therefore encourage [upgrading your API version][api-version-upgrading]
if you would like to take advantage of Stripe's TypeScript definitions.

If you are on an older API version (eg; `2019-10-17`) and not able to upgrade,
If you are on an older API version (e.g., `2019-10-17`) and not able to upgrade,
you may pass another version or `apiVersion: null` to use your account's default API version,
and use a comment like `// @ts-ignore stripe-version-2019-10-17` to silence type errors here
and anywhere the types differ between your API version and the latest.
Expand All @@ -100,7 +100,7 @@ When you upgrade, you should remove these comments.
#### Using `expand` with TypeScript

[Expandable][expanding_objects] fields are typed as `string | Foo`,
so you must cast them appropriately, eg;
so you must cast them appropriately, e.g.,

```ts
const charge: Stripe.Charge = await stripe.charges.retrieve('ch_123', {
Expand Down
4 changes: 2 additions & 2 deletions lib/StripeResource.js
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ StripeResource.prototype = {
return true;
}

// The API may ask us not to retry (eg; if doing so would be a no-op)
// or advise us to retry (eg; in cases of lock timeouts); we defer to that.
// The API may ask us not to retry (e.g., if doing so would be a no-op)
// or advise us to retry (e.g., in cases of lock timeouts); we defer to that.
if (res.headers && res.headers['stripe-should-retry'] === 'false') {
return false;
}
Expand Down
2 changes: 1 addition & 1 deletion lib/autoPagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ function makeAutoPagingToArray(autoPagingEach) {
const limit = opts && opts.limit;
if (!limit) {
throw Error(
'You must pass a `limit` option to autoPagingToArray, eg; `autoPagingToArray({limit: 1000});`.'
'You must pass a `limit` option to autoPagingToArray, e.g., `autoPagingToArray({limit: 1000});`.'
);
}
if (limit > 10000) {
Expand Down
2 changes: 1 addition & 1 deletion lib/stripe.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ function Stripe(key, config = {}) {
const typescript = props.typescript || false;
if (typescript !== Stripe.USER_AGENT.typescript) {
// The mutation here is uncomfortable, but likely fastest;
// seralizing the user agent involves shelling out to the system,
// serializing the user agent involves shelling out to the system,
// and given some users may instantiate the library many times without switching between TS and non-TS,
// we only want to incur the performance hit when that actually happens.
Stripe.USER_AGENT_SERIALIZED = null;
Expand Down
2 changes: 1 addition & 1 deletion test/autoPagination.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ describe('auto pagination', function() {
}
})
).to.eventually.equal(
'You must pass a `limit` option to autoPagingToArray, eg; `autoPagingToArray({limit: 1000});`.'
'You must pass a `limit` option to autoPagingToArray, e.g., `autoPagingToArray({limit: 1000});`.'
));

it('caps the `limit` arg to a reasonable ceiling', () =>
Expand Down
4 changes: 2 additions & 2 deletions types/Webhooks.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ declare module 'stripe' {
header: string,

/**
* Your Webhook Signing Secret for this endpoint (eg; 'whsec_...').
* Your Webhook Signing Secret for this endpoint (e.g., 'whsec_...').
* You can get this [in your dashboard](https://dashboard.stripe.com/webhooks).
*/
secret: string,
Expand All @@ -46,7 +46,7 @@ declare module 'stripe' {
timestamp?: number;

/**
* Stripe webhook secret, eg; 'whsec_...'.
* Stripe webhook secret, e.g., 'whsec_...'.
*/
secret: string;

Expand Down
2 changes: 1 addition & 1 deletion types/lib.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ declare module 'stripe' {
stripe_account?: string;

/**
* The [API Version](https://stripe.com/docs/upgrades) to use for a given request (eg; '2019-12-03').
* The [API Version](https://stripe.com/docs/upgrades) to use for a given request (e.g., '2019-12-03').
*/
stripeVersion?: string;
/** @deprecated Please use stripeVersion instead. */
Expand Down

0 comments on commit 118ec3b

Please sign in to comment.