-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor collectVariableUsage #38
Comments
This doesn't need to be shipped in a new major version. It can simply be published once it's ready while still keeping the old API around |
It turns out that this analysis in not possible without the type checker. Namespace merging and imports in namespaces can introduce identifiers whose domain is not known. That's already an issue in the current implementation, which has yet to be reported. // foo.ts
namespace foo {
export class C {}
}
// bar.ts
class C {}
namespace foo {
new C(); // references `foo.C`
}
namespace bar {
import C = foo.C;
new C(); // references `foo.C`
} Everything that doesn't involve namespaces during name resolution could still work as expected. TBD: how to proceed from here?
|
It might be the best to simply return |
The current API is somewhat difficult to use and does too much by analyzing the whole source file ahead of time.
The new API should return an object that can be used to:
optionally:
Needs a good name:
The text was updated successfully, but these errors were encountered: