Skip to content

🚀 Feature: Port collectVariableUsage from tsutils #263

@JoshuaKGoldberg

Description

@JoshuaKGoldberg

Bug Report Checklist

  • I have tried restarting my IDE and the issue persists.
  • I have pulled the latest main branch of the repository.
  • I have searched for related issues and found none that matched my issue.

Overview

tsutils has a collectVariableUsage API: microsoft/TypeScript#28026 -> https://github.com/ajafff/tsutils/blob/03b4df15d14702f9c7a128ac3fae77171778d613/util/usage.ts#L162-L164. We haven't ported that over yet.

I use it in TypeStat, which means not having it is blocking JoshuaKGoldberg/TypeStat#1123.

Additional Info

cc @bradzacher @RebeccaStevens - do you see any reason not to port the old collectVariableUsage API here?

Note that ajafff/tsutils#38 tracks refactoring the API to be more type aware. I don't have the energy to make that port. But I suppose we could always take it in as a followup.

Metadata

Metadata

Labels

status: accepting prsPlease, send a pull request to resolve this! 🙏type: featureNew enhancement or request 🚀

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions