For example, inside you component you want to import a file from two up directory:
import store from '../../store'
This becomes a little bit problematic because the component can be really nested.
To solve this problem, we can define "paths" in tsconfig.json:
{ ... "compilerOptions": { "baseUrl": ".", "paths": { "store": ["src/store.ts"] }, ... "target": "es5" } }
Now for each component, we can just use:
import store from 'store'