fix typing

This commit is contained in:
Vikhyath Mondreti
2026-01-30 16:35:44 -08:00
parent 1eacfcb864
commit a660907c22

View File

@@ -1,3 +1,4 @@
import type Stripe from 'stripe'
import {
getFreeTierLimit,
getProTierLimit,
@@ -82,7 +83,7 @@ export interface StripePlanResolution {
* Used to get the authoritative plan from Stripe rather than relying on DB state.
*/
export function resolvePlanFromStripeSubscription(
stripeSubscription: { items?: { data?: Array<{ price?: { id?: string } }> } } | null | undefined
stripeSubscription: Stripe.Subscription
): StripePlanResolution {
const priceId = stripeSubscription?.items?.data?.[0]?.price?.id
const plan = priceId ? getPlanByPriceId(priceId) : undefined