Skip to content

🚀 Feature: typeParts API, combining intersectionTypeParts and unionTypeParts? #258

@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

https://github.com/typescript-eslint/typescript-eslint/pull/7466/files#diff-3cc43b506517aba406ae3a31d7998b116c4b09db76b632c6cb3c2e54fc71d66cR33 shows code that wants the type parts of a type that can be either an intersection or union. Maybe it'd be nice to expose a simplified function to do this? Maybe with a recursive?: boolean parameter/option?

My instinct is no, since folks can do this pretty on their own in a straightforward manner. But just thinking out loud.

Additional Info

No response

Metadata

Metadata

Labels

status: in discussionNot yet ready for implementation or a pull requesttype: featureNew enhancement or request 🚀

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions