Installing Type Definition for Stripe

Image by xresch from Pixabay

Scenario

Approach

npm i -S @types/stripe
import { Stripe } from 'stripe'export function loadCustomersByEmail(email): Stripe.ApiListPromise<Stripe.Customer> {
return stripe.customers.list({ email })
}
async function loadCustomers() {
const c:Stripe.ApiList<Stripe.Customer> =
await loadCustomersByEmail('pity.the.foo@snail.com')
}

Founder of Firefly Semantics Corporation