#-charmines_code

1 messages ยท Page 1 of 1 (latest)

lost locustBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1329248418568081541

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

drifting hamlet
#

Continuation of #1328979669621542928
To summarize I am having an issue where a large amount of stripe's typescript types are not working. I have tried to reload the project, restart vs code, compiling anyway, and uninstalling and reinstalling stripe from npm. My issue is that any of the types like Stripe.PaymentIntent, Stripe.Invoice, and Stripe.charge do not seem to work properly and error with Property 'PaymentIntent' does not exist on type 'typeof Stripe'.ts(2339).

#

In the last thread I opened someone also mentioned that there is a stripe vscode extension but I believe it is not an ide issue due to the typescript code not compiling.

#

Can I also know how long it is before threads close? Ive had 2 close already

ember mountain
#

hi! i'll take a look at this soon

#

we don't have a hard timeline around when threads are closed but a good rule of thumb would be ~30 minutes of inactivity

drifting hamlet
#

Oh ok, so what does idle mean exactly then, I will come back every so often but I didnt want to be too annoying

ember mountain
#

if we're waiting on information from you for a while sometimes we'll close the thread, but you're always welcome to make a new one and just reference the old one

drifting hamlet
#

Yea I just feel like getting more than 3 threads deep seems hard to work with thanks

ember mountain
#

yep of course!

lost locustBOT
drifting hamlet
#

welcome in

obtuse edge
#

I'm taking over this thread, let me know if you have any follow-up questions.

drifting hamlet
#

Sounds good nothing more than trying to get these types to work :p

obtuse edge
#

Can you show me your code?

drifting hamlet
obtuse edge
#

Did you import @stripe/stripe-js or stripe ?

drifting hamlet
#

stripe

obtuse edge
#

Ok, can you share with me the sample project that I reproduce the problem?

drifting hamlet
#

Just some sample code or what do you need more specifically?

obtuse edge
#

I tested your code and I have no problem in using stripe typing

#

So there's a possibility that the typing problem is caused by your project configuraiotn.

drifting hamlet
#

Really?

#

hm

#

Alright I can rar it up for you and send it if you would like

obtuse edge
#

Sure, you can DM it to me

drifting hamlet
#

Alright give me just a moment to get that cleaned up and sent

#

on its way

obtuse edge
#

Ok let me take a look

drifting hamlet
#

๐Ÿ‘

obtuse edge
#

Which file shall I check?

drifting hamlet
#

oh sorry meant to tell you its src/modules/stripe.ts

#

Specifically line 59

#

but if you uncomment 61-64 you will see none of those types work for me either (unless it just works for you of course)

#

.Payment may not be one but it was to try to autocomplete it

#

Any findings/is the error at least replicable?

obtuse edge
#

Looking at it

drifting hamlet
#

No worries not trying to rush you or anything just interested

obtuse edge
#

Ok, it looks like Stripe.PaymentIntent.Status.Succeeded isn't exported and that's why you can't import it in your project.

Sorry my IDE was having a problem and that's why it didn't show the typing error earlier.

drifting hamlet
#

hm interesting so the whole PaymentIntent type isnt exported?

obtuse edge
#

No it's not

drifting hamlet
#

hm ok but how does it differ from PaymentIntentCreateParams which is supposedly exported?

#

im used to see export ... but I dont see that for either

obtuse edge
#

Hmm. wait

drifting hamlet
#

Also if it isnt exported is there a reason for that and could we see it exported? Seems to me that it would be valuable to have all types available

obtuse edge
#

Let me check something

drifting hamlet
#

Alrighty

obtuse edge
#

I'm able to import Stripe.PaymentIntent in my own project/

drifting hamlet
#

Interesting

#

See thats where im confused is it really seems like it is only giving me a portion of the types that are available

drifting hamlet
#

So are you still looking at the project at the moment or is there something I need to do to figure out what the issue may be?

obtuse edge
drifting hamlet
#

my project had an eslint.config.js as opposed to .eslintrc.js but I will try it

#

Although I still would not understand why that would affect compilation

#

Weirdly that doesnt seem to make a difference for me at all

#

Notably the issue appears to come directly from typescript not eslint

obtuse edge
#

Can you add

``` in your code and see if you get typing errors?
drifting hamlet
#

interesting

#

The original typing error still exists but adding the type there works fine

obtuse edge
#

With that I believe you can continue you development with typing support.

drifting hamlet
#

Hm technically yes but it still seems like continuing would leave an issue unresolved

drifting hamlet
obtuse edge
#

Right, Status isn't exported so you can use "succeeded" instead

drifting hamlet
#

See but once again what makes PaymentIntent.x such as status any different from PaymentIntentCreateParams.x ?

obtuse edge
#

I don't think PaymentIntentCreateParams.x contains status

drifting hamlet
#

Like it doesnt seem any different that one would be exported and the other not to me

drifting hamlet
#

oh wait

#

nevermind it doesnt work either

#

so it doesnt export but the type can still be used? in type only areas