示例中 PanResponder 的流类型

Flow type for PanResponder like in example

无法找到 PanResponder 的流类型,如官方 react-native 示例中所示。

此处示例:https://github.com/facebook/react-native/blob/0ccedf3964b1ebff43e4631d1e60b3e733096e56/RNTester/js/examples/PanResponder/PanResponderExample.js#L17

这不起作用:

import type {
  PanResponderInstance,
} from 'react-native';

输入 PanResponders:

// @flow

type Props = {…};
type State = {…};
class Screen extends Component<Props, State> {
  _panresponder: PanResponderInstance
  …
}

我想像上面链接的示例一样使用 PanResponder 的流类型。如何从 react-native 访问 PanResponder (PanResponderInstance) 的类型?

我想通了:

import type {
   PanResponderInstance,
} from 'react-native/Libraries/Interaction/PanResponder';

可悲的是,这似乎是实现它的方法,虽然不是最优但有效。

import type {
   PanResponderInstance,
} from 'react-native';

这将适用于 React Native 0.64