Since typescript doesn\'t seem to support absolute path references, I can\'t see how to keep my references tidy. I\'ve got ts files at many different locations in my folder stru
In order to keep your relative path references tidy, specify path alias(es) in your tsconfig.json
First of all install tspath an npm tool for resolving ts paths NOTE: tspath requires a very recent versison of node!
npm install -g tspath
Next, add path aliases to tsconfig.json
"baseUrl": "./",
"paths": {
"@Scripts/*": ["./Scripts/typings/jquery/*"],
"@Plugins/*": ["./MyPlugins/V2/*"]
}
Now use your alias when referencing your scripts
@Scripts/jquery
@Plugins/myPlugin
After you have run the TypeScript compiler, from your project directory, run:
tspath
or
tspath -f
to skip the prompt!
Read more at: https://www.npmjs.com/package/tspath
Hope this is what you asked for!