TypeScript 1.0 import references

Topics: Language Specification
May 24, 2014 at 7:07 PM
Edited May 24, 2014 at 7:08 PM
Hello: At TSLint, we have a rule to detect unused imports. We do that by calling into LanguageService's getReferencesAtPosition for all import variables and counting the number of references. This works fine in 0.9.7, but it's broken in 1.0. For example, consider the snippet:
import $ = require("jquery");
$("a");
getReferencesAtPosition previously returned 2 for the position 7 (where $ is defined) and now just 1. This appears to be a regression that now puts the "unused imports" rule at risk, and I'm hesitant to upgrade the linter to use 1.0. Can someone please look into this? Thanks!
Coordinator
May 27, 2014 at 8:36 PM
Sounds like it's a bug in the language service. Copying this over to a work item.
Coordinator
May 27, 2014 at 8:37 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.