Skip to content

Stripe.Decimal is undefined at runtime even though TypeScript doesn't complain #2625

@kenmueller

Description

@kenmueller

Describe the bug

Stripe.Decimal is undefined even though typescript doesn't complain. My temporary patch:

// @ts-expect-error Stripe.Decimal is undefined at runtime
import { type Stripe, Decimal as _StripeDecimal } from 'stripe';

// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
const StripeDecimal = _StripeDecimal as typeof Stripe.Decimal;

To Reproduce

import { Stripe } from 'stripe';
Stripe.Decimal.from('1.0');

Expected behavior

Works at runtime

Code snippets

OS

macOS

Node version

24.14.1

Library version

21.0.0

API version

2026-03-25.dahlia

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions