Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6287

How to get Typescript support for files imported using a local package.json

$
0
0

I'm adding package.json files in the main folders of my app to be able to import files easily, for example in constants folder there is a package.json file with {"name":"@constants"} and to import from the folder I use:

import file from '@constants'

This is very convenient, but when using Typescript I don't get error checking, autocomplete... for files imported these way.


Viewing all articles
Browse latest Browse all 6287

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>