Skip to content

How to use with typescript #204

Closed Answered by AleFossati
santigarcor asked this question in Q&A
Discussion options

You must be logged in to vote

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 the server folder and yes, you can use it in other folders, but you have to explicitly import it like import _ 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…

Replies: 1 comment 15 replies

Comment options

You must be logged in to vote
15 replies
@santigarcor
Comment options

@AleFossati
Comment options

@santigarcor
Comment options

@AleFossati
Comment options

Answer selected by santigarcor
@santigarcor
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants