Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Libraries/Components/ScrollResponder.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ const ReactNative = require('../Renderer/shims/ReactNative');
const TextInputState = require('./TextInput/TextInputState');
const UIManager = require('../ReactNative/UIManager');
const Platform = require('../Utilities/Platform');
const ScrollView = require('./ScrollView/ScrollView');
import Commands from './ScrollView/ScrollViewCommands';

const invariant = require('invariant');
const performanceNow = require('fbjs/lib/performanceNow');

import type {PressEvent, ScrollEvent} from '../Types/CoreEventTypes';
import typeof ScrollView from './ScrollView/ScrollView';
import type {Props as ScrollViewProps} from './ScrollView/ScrollView';
import type {KeyboardEvent} from './Keyboard/Keyboard';
import type EmitterSubscription from '../vendor/emitter/EmitterSubscription';
Expand Down Expand Up @@ -468,7 +468,7 @@ const ScrollResponderMixin = {
({x, y, animated} = x || {});
}

const that: React.ElementRef<typeof ScrollView> = (this: any);
Comment thread
Naturalclar marked this conversation as resolved.
Comment thread
Naturalclar marked this conversation as resolved.
Comment thread
Naturalclar marked this conversation as resolved.
const that: React.ElementRef<ScrollView> = (this: any);
invariant(
that.getNativeScrollRef != null,
'Expected scrollTo to be called on a scrollViewRef. If this exception occurs it is likely a bug in React Native',
Expand All @@ -492,7 +492,7 @@ const ScrollResponderMixin = {
// Default to true
const animated = (options && options.animated) !== false;

Comment thread
Naturalclar marked this conversation as resolved.
Comment thread
Naturalclar marked this conversation as resolved.
Comment thread
Naturalclar marked this conversation as resolved.
const that: React.ElementRef<typeof ScrollView> = (this: any);
const that: React.ElementRef<ScrollView> = (this: any);
invariant(
that.getNativeScrollRef != null,
'Expected scrollToEnd to be called on a scrollViewRef. If this exception occurs it is likely a bug in React Native',
Expand Down Expand Up @@ -531,7 +531,7 @@ const ScrollResponderMixin = {
);
}

const that: React.ElementRef<typeof ScrollView> = this;
const that: React.ElementRef<ScrollView> = this;
invariant(
that.getNativeScrollRef != null,
'Expected zoomToRect to be called on a scrollViewRef. If this exception occurs it is likely a bug in React Native',
Expand All @@ -547,7 +547,7 @@ const ScrollResponderMixin = {
* Displays the scroll indicators momentarily.
Comment thread
Naturalclar marked this conversation as resolved.
Comment thread
Naturalclar marked this conversation as resolved.
Comment thread
Naturalclar marked this conversation as resolved.
*/
scrollResponderFlashScrollIndicators: function() {
const that: React.ElementRef<typeof ScrollView> = (this: any);
const that: React.ElementRef<ScrollView> = (this: any);
invariant(
that.getNativeScrollRef != null,
'Expected flashScrollIndicators to be called on a scrollViewRef. If this exception occurs it is likely a bug in React Native',
Expand Down