Skip to content
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

🚀 Feature: Rename "TypeParts" functions to "Constituents"? #375

Open
3 tasks done
JoshuaKGoldberg opened this issue Jan 30, 2024 · 0 comments
Open
3 tasks done
Labels
status: in discussion Not yet ready for implementation or a pull request type: feature New enhancement or request 🚀

Comments

@JoshuaKGoldberg
Copy link
Owner

JoshuaKGoldberg commented Jan 30, 2024

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

There are three functions exported or proposed for ts-api-utils around returning the .types property of a type:

The terminology we use in typescript-eslint for "type parts" is constituent (typescript-eslint/typescript-eslint#5841). My proposal is:

  1. Make the same 2-3 functions available under names get(Intersection|Union)?Constituents, marking the old functions as @deprecated
  2. Update them in any libraries we maintain - especially if we're forced to by eslint-plugin-deprecation
  3. Remove the old names in the next major version

Additional Info

No response

@JoshuaKGoldberg JoshuaKGoldberg added type: feature New enhancement or request 🚀 status: in discussion Not yet ready for implementation or a pull request labels Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: in discussion Not yet ready for implementation or a pull request type: feature New enhancement or request 🚀
Projects
None yet
Development

No branches or pull requests

1 participant