#-charmines_code
1 messages ยท Page 1 of 1 (latest)
๐ 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.
- -charmines_code, 8 hours ago, 9 messages
- -charmines_code, 15 hours ago, 55 messages
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
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
Oh ok, so what does idle mean exactly then, I will come back every so often but I didnt want to be too annoying
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
Yea I just feel like getting more than 3 threads deep seems hard to work with thanks
yep of course!
welcome in
I'm taking over this thread, let me know if you have any follow-up questions.
Sounds good nothing more than trying to get these types to work :p
Can you show me your code?
Did you import @stripe/stripe-js or stripe ?
stripe
Ok, can you share with me the sample project that I reproduce the problem?
Just some sample code or what do you need more specifically?
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.
Sure, you can DM it to me
Ok let me take a look
๐
Which file shall I check?
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?
Looking at it
No worries not trying to rush you or anything just interested
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.
hm interesting so the whole PaymentIntent type isnt exported?
No it's not
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
Hmm. wait
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
Let me check something
Alrighty
I'm able to import Stripe.PaymentIntent in my own project/
Interesting
See thats where im confused is it really seems like it is only giving me a portion of the types that are available
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?
https://github.com/stripe/stripe-node/blob/master/testProjects/mjs-ts/.eslintrc.js I replaced your project's .eslintrc.js file with this one, and I'm able to import Stripe.PaymentIntent
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
interesting
The original typing error still exists but adding the type there works fine
With that I believe you can continue you development with typing support.
Hm technically yes but it still seems like continuing would leave an issue unresolved
for example the enum like this still wont work
Right, Status isn't exported so you can use "succeeded" instead
See but once again what makes PaymentIntent.x such as status any different from PaymentIntentCreateParams.x ?
I don't think PaymentIntentCreateParams.x contains status
Like it doesnt seem any different that one would be exported and the other not to me
it does not but my point is I cant access PaymentIntent at all like PaymentIntentCreateParams
oh wait
nevermind it doesnt work either
so it doesnt export but the type can still be used? in type only areas