adobe / adobe/react-spectrum

export internal types such as StyleRenderProps, ScrollableProps, etc

Open
#6,406 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
15.9k
Forks
1.6k
Avg merge
3d 9m
Merged PRs (30d)
59

Description

### Provide a general summary of the feature here

When extending functionality (e.g. doing what I mentioned in [here](https://github.com/adobe/react-spectrum/issues/6403#issuecomment-2116904029)),
or composing components in general, it's very often that we will need to access those types.

Utils like `Pick` and `Omit` may not work all the time, e.g. when distribution is involved or configuration differences such as `strict` or `exactOptionalPropertyTypes`.

### 🤔 Expected Behavior?

export types used by public types

### 😯 Current Behavior

They are not exported

### 💁 Possible Solution

_No response_

### 🔦 Context

Note that it is true that exporting more types increase the surface area of the public API, making type-level breakage more easy to occurs.
So it is a balance between stability and extensibility.

Each library takes a different stance on this.
Some disregards type-level breaking changes as breaking changes,
Some do that conditionally, such as identifying some types as key types based on basic usage vs advance usage.
Some fully respect that such as some library focus on types.

### 💻 Examples

_No response_

### 🧢 Your Company/Team

_No response_

### 🕷 Tracking Issue

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.