How to use with typescript #204
-
Beta Was this translation helpful? Give feedback.
Answered by
AleFossati
May 2, 2024
Replies: 1 comment 15 replies
-
Hi @santigarcor, Could you please send the more of the code - with the imports and/or script tags - without private data (for example: without your public key)? |
Beta Was this translation helpful? Give feedback.
15 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've installed
@types/lodash
here as well and it does have the same behaviour that@types/mercadopago-sdk-js
has in Nuxt, unfortunately this is an inconvenient caused by the Nuxt configuration. See the video below.Gravacao.de.Tela.2024-05-02.as.18.13.33.mov
The
_
is available only inside theserver
folder and yes, you can use it in other folders, but you have to explicitly import it likeimport _ from 'lodash'
, see the video below.Gravacao.de.Tela.2024-05-02.as.18.16.58.mov
The problem here is that lodash functions can be imported, so it does make sense that it works this way.
In the other hand, the @mercadopago/sdk-js npm package is only a wrapper of the actual mercad…