Skip to content

ScrollView.d.ts does not match ScrollView.js #51548

@edkimmel

Description

@edkimmel

Description

There has been recent changes to ScrollView's props and types in ScrollView.js, but the declaration file has not been updated.

For example.

  /**
   * A ref to the inner View element of the ScrollView. This should be used
   * instead of calling `getInnerViewRef`.
   */
  innerViewRef?: React.RefSetter<InnerViewInstance>,
  /**
   * A ref to the Native ScrollView component. This ref can be used to call
   * all of ScrollView's public methods, in addition to native methods like
   * measure, measureLayout, etc.
   */
  scrollViewRef?: React.RefSetter<PublicScrollViewInstance>,

These props are not visible to the caller, because they are missing in the declaration file.

Steps to reproduce

Compare the props exposed by the declaration file

compared to the source

The declaration file is also one year old (as of 0.79.2) where as ScrollView was changed more recently.

React Native Version

0.79.2

Affected Platforms

Build - MacOS

Output of npx @react-native-community/cli info

N/A

Stacktrace or Logs

N/A

MANDATORY Reproducer

https://github.com/edkimmel/scroll-view-props

Screenshots and Videos

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions