Mastering Development

TypeScript not finding variable declared in type declaration if I import a file

I made a very simple library which contains a .d.ts (source) which has the following structure (I omit the details because the file works fine, it likely is a config issue in my project): // Some helper types and interfaces type TranslationFunction = /* … */; export { TranslationFunction }; Then, I do npm i […]


Why create-react-app alias is not able to find index.js from folder?

I am stuck up with a weird issue while creating alias for my app. I am trying to create the alias adding jsconfig.json what looks like { “compilerOptions”: { “lib”: [ “dom”, “es2015”, “es2016”, “es6”, “es2017” ], “target”: “es2017”, “module”: “es6”, “allowSyntheticDefaultImports”: true, “baseUrl”: “./”, “paths”: { “actions/*”: [“src/actions/*”], “public/*”: [“public/*”], “components/*”: [“src/components/*”], “containers/*”: [“src/containers/*”], […]