#Shiroyasha-get-type
1 messages · Page 1 of 1 (latest)
There's a folder called types in the Stripe Node module that shows the types of all the Stripe objects. Is that what you're looking for?
It's usually under node-modules/stripe/types/<your API version>
here for example, i must add any to balance
but i want that node recognize the stripe lib and mark the response as it should be (here for example the balance object)
(and yes i have the type folder in my lib)
I'm not sure I understand. What do you mean "mark as it should be"?
sorry for not being clear
for example i use firebase too, when i use firebase lib i can see things like this :
i think it s possible with stripe lib too but i dont know how
i dont have to put an ugly "any" in front the return object. node know that i use firebase lib so he know that this function return a querySnapshot
Ah I see. I don't think that's possible with our current library but let me double check with folks internally
Ok thanks for your help
Hello, let me see if I can help
Okay I don't really understand your question and the context. We have Typescript definitions for the whole library @tranquil spoke. What exactly is confusing you/blocking you? We have https://github.com/stripe/stripe-node#usage-with-typescript covering some of it but assume prior knowledge of Typescript mostly
maybe because i use it in the "old" way
For example if I hover over retrieve, here's what I see:
if i import it with es6 syntax i ll get all type i think
ah yeah, I'm not really familiar with TS myself, I can just make do with basic examples
yes that s what i want !
which version of stripe-node are you using?
okay so you're on the most recent, so it feels like you're not loading/including stripe-node properly. Unfortunately I'm not really familiar with TS beyond having it "just work" for me like i does for Firebase for you