mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 07:45:18 -06:00
Also wrap getEffectiveTypeRoots in import completion code
This commit is contained in:
parent
4af2dcd32e
commit
6ea5c22760
@ -575,9 +575,17 @@ namespace ts.Completions {
|
||||
}
|
||||
}
|
||||
else if (host.getDirectories) {
|
||||
const typeRoots = getEffectiveTypeRoots(options, host);
|
||||
for (const root of typeRoots) {
|
||||
getCompletionEntriesFromDirectories(host, options, root, span, result);
|
||||
let typeRoots: string[];
|
||||
try {
|
||||
// Wrap in try catch because getEffectiveTypeRoots touches the filesystem
|
||||
typeRoots = getEffectiveTypeRoots(options, host);
|
||||
}
|
||||
catch (e) {}
|
||||
|
||||
if (typeRoots) {
|
||||
for (const root of typeRoots) {
|
||||
getCompletionEntriesFromDirectories(host, options, root, span, result);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user