🚀 Feature: Add (back) type aliasing #1223
Labels
area: fixers
Around how TypeStat fixes code.
area: options
Reading, parsing, and manipulating CLI and/or Cosmiconfig-read options
status: accepting prs
Please, send a pull request to resolve this! 🙏
type: enhancement
New feature or request
🚀 Feature Request
It's sometimes useful to replace added TypeScript types with other strings. Most commonly, some conversions use a type like
type $AnyTodoFixMeTS49 = any;
instead ofany
to make it clear that theany
should be fixed up eventually.Existing Behavior
TypeStat does not support these kinds of aliases.
Change Proposal
Let's add in a new option with a name like ...
typeAliases
, perhaps? Maybe it could be aRecord<string, string>
keying aliases (strings, allowing for stringified regular expressions) to their replacement?Additional Information
TypeStat actually used to have this! I'd removed the feature in #793 (and docs in eedded4) #765 easier. But now that #765 is done, it'd be useful to add this option back.
Thanks @tannerlinsley for reminding me of this!
The text was updated successfully, but these errors were encountered: