Align public type for Touchable#57419
Closed
huntie wants to merge 1 commit into
Closed
Conversation
Summary:
**Problem**
Under the Strict TypeScript API, `Touchable` was a value-only TypeScript export referencing `TouchableImpl`, which leaked additional `{Mixin, renderDebugView}` members.
**Fix**
Export a declaration-merged `Touchable` type at root, specifying a public interface for this module that excludes these members.
**Impact**
- API snapshot cleanup: Hides internal `TouchableImpl` and `TouchableMixinImpl` details.
- **Functional**: Removes `Touchable.renderDebugView()` from the public API. This is **non-breaking** as this type was not previously modelled under the manual TS types.
- **Functional**: Fixes equivalence of `Touchable` when referenced as a type under Uniwind — which was a breaking change vs the manual TS types (extra props were leaked).
https://github.com/uni-stack/uniwind/blob/6b498f2ada673d2b92915c79a703286078b953c2/packages/uniwind/types.d.ts#L40
**Notes**
- As part of this change, other `Libraries/`/`*Impl` APIs were audited to check for similar internal API leaks. This is the only obvious instance.
- Also simplify outdated doc comment (`Touchable` subtypes are intended for primary use and have separate docs pages).
Changelog:
[General][Fixed] - **Strict TypeScript API**: Export a public `Touchable` type object, reducing its API to match the previous manual types
Differential Revision: D110483989
|
@huntie has exported this pull request. If you are a Meta employee, you can view the originating Diff in D110483989. |
|
Warning JavaScript API change detected This PR commits an update to
This change was flagged as: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Problem
Under the Strict TypeScript API,
Touchablewas a value-only TypeScript export referencingTouchableImpl, which leaked additional{Mixin, renderDebugView}members.Fix
Export a declaration-merged
Touchabletype at root, specifying a public interface for this module that excludes these members.Impact
TouchableImplandTouchableMixinImpldetails.Touchable.renderDebugView()from the public API. This is non-breaking as this type was not previously modelled under the manual TS types.Touchablewhen referenced as a type under Uniwind — which was a breaking change vs the manual TS types (extra props were leaked).https://github.com/uni-stack/uniwind/blob/6b498f2ada673d2b92915c79a703286078b953c2/packages/uniwind/types.d.ts#L40
Notes
Libraries//*ImplAPIs were audited to check for similar internal API leaks. This is the only obvious instance.Touchablesubtypes are intended for primary use and have separate docs pages).Changelog:
[General][Fixed] - Strict TypeScript API: Export a public
Touchabletype object, reducing its API to match the previous manual typesDifferential Revision: D110483989