ScanTree icon indicating copy to clipboard operation
ScanTree copied to clipboard

support TS-style comment annotations

Open getify opened this issue 10 years ago • 2 comments

Per: http://stackoverflow.com/questions/12930049/how-do-i-import-other-typescript-files

+@vivainio

getify avatar Jul 11 '15 20:07 getify

One potential issue, which may require this to be behind a flag instead of automatic: typescript may have a different interpretation of relative URLs than scantree uses. For example, TypeScript (and IDEs) may assume that a "../foo/bar.js" path is relative to the file it's included in, rather than relative to some base path setting (as scantree does).

If so, I could change the assumptions about relativity for typescript pathing, but I don't know if I could practically do so on a per-path basis (strings are all that's passed around internally). It might be a flag you have to pass (--file-relative) which changes the definition of "relative" to "relative to current file" instead of "relative to base-path".

getify avatar Jul 11 '15 21:07 getify

So, basic support for this should now be in there as of 0.3.0-a. But need to work out if the --file-relative option is necessary to fully support how people use typescript annotations with relative paths. Will leave this open for now as we investigate.

getify avatar Jul 11 '15 22:07 getify