Skip to content

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

@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

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

Metadata

Metadata

Assignees

No one assigned

    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