Search code examples
typescriptdeno

Deno types show type /*unresolved*/ any


Deno types show /*unresolved*/ any – I get no type information

Example

import Stripe from 'stripe';

const stripe = Stripe(stripeApiKey);

    const paymentIntent: Stripe.PaymentIntent =
      await stripe.paymentIntents.create({
        amount: 1000,
      });

Solution

  • Turns out the types were half-way working, but not fully, because

    const stripe = new Stripe(stripeApiKey);
    

    was missing new.