From 7255a06be289df95b44b4b5ac2510ccced636872 Mon Sep 17 00:00:00 2001 From: sagiereder <34967034+sagiereder@users.noreply.github.com> Date: Sat, 18 Jan 2025 18:03:49 +0200 Subject: [PATCH] make allowedEvents strict --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 470bfbc..ae4a882 100644 --- a/README.md +++ b/README.md @@ -229,7 +229,7 @@ async function processEvent(event: Stripe.Event) { If there are more I should be tracking for updates, please file a PR. If they don't affect subscription state, I do not care. ```ts -const allowedEvents = [ +const allowedEvents: Stripe.Event.Type[] = [ "checkout.session.completed", "customer.subscription.created", "customer.subscription.updated", @@ -248,7 +248,7 @@ const allowedEvents = [ "payment_intent.succeeded", "payment_intent.payment_failed", "payment_intent.canceled", -] as Stripe.Event.Type[]; +]; ``` ### Custom Stripe subscription type