Skip to content

Commit

Permalink
fix(typescript_indexer): don't throw on unfound module path (#3882)
Browse files Browse the repository at this point in the history
This broke development downstream.
  • Loading branch information
ayazhafiz authored and salguarnieri committed Jul 12, 2019
1 parent 1e44386 commit e8f2c5e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kythe/typescript/indexer.ts
Expand Up @@ -758,8 +758,9 @@ class Visitor {
// TODO: this is hacky; it may be the case we need to use the TypeScript
// module resolver to get the real path (?). But it appears the symbol
// name is the quoted(!) path to the module.
// TODO(ayazhafiz): Fix the above.
if (!(name.startsWith('"') && name.endsWith('"'))) {
throw new Error(`TODO: handle module symbol ${name}`);
this.todo(sym.declarations[0], `TODO: handle module symbol ${name}`);
}
const sourcePath = name.substr(1, name.length - 2);
return this.host.moduleName(sourcePath);
Expand Down

0 comments on commit e8f2c5e

Please sign in to comment.