- #2669 Add constructor based initialization for CJS based TypeScript imports
- Initialization of Stripe class with
newkeyword is now possible for CJS based TypeScript project. Resolves: 2660
import Stripe = require('stripe'); // ✅ Both statements work const stripeNew: Stripe.Stripe = new Stripe('sk_test_...'); const stripeCalled: Stripe.Stripe = Stripe('sk_test_...');
- Initialization of Stripe class with
- #2664 Fixed nested service param exports in the Stripe namespace
- #2667 Add type safety to Stripe constructor config (no runtime change)
- Fixed some compile-time checks (no runtime changes)
- Fixed
Stripeconstructor config parameter to useStripeConfigtype instead ofRecord<string, unknown>, restoring compile-time type safety. - Added missing
authenticatorproperty toStripeConfig. - Fixed
Stripe.API_VERSIONto retain the literal API version type. - Fixed
StripeConfig.stripeContextto acceptStripeContextobjects in addition to strings.
- Fixed
- Fixed some compile-time checks (no runtime changes)
- #2663 Throw a more descriptive error when calling
rawRequestwith absolute urls - #2652 Added
string[]toWebhookHeadertype for compatibility with express- Added
string[]to the type ofsignatureparam instripe.webhooks.construct_eventmethod.
- Added