How to block typescript 2.0 from walking up all parent directories while resolving modules?
The official documentation specifies that node_modules in current directory and all parents will be traversed unless you specify typeRoots
.
So in theory, the answer should be this:
{
"compilerOptions": {
"typeRoots": [
"./node_modules/@types"
]
}
}
Since you still want to include the types from the current directory.
Unfortunately this doesn't seem to work correctly for me.