2019-01-15 16:35:20 -08:00
|
|
|
/**
|
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
|
|
*
|
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
|
|
|
*
|
|
|
|
* @format
|
2019-01-23 02:15:21 -08:00
|
|
|
* @flow
|
2019-01-15 16:35:20 -08:00
|
|
|
*/
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
2019-01-23 02:15:21 -08:00
|
|
|
import type {SyntheticEvent} from 'CoreEventTypes';
|
|
|
|
import type {ViewProps} from 'ViewPropTypes';
|
|
|
|
import type {NativeComponent} from 'ReactNative';
|
|
|
|
|
|
|
|
type SnapshotReadyEvent = SyntheticEvent<
|
|
|
|
$ReadOnly<{
|
|
|
|
testIdentifier: string,
|
|
|
|
}>,
|
|
|
|
>;
|
|
|
|
|
|
|
|
type NativeProps = $ReadOnly<{|
|
|
|
|
...ViewProps,
|
|
|
|
onSnapshotReady?: ?(event: SnapshotReadyEvent) => mixed,
|
|
|
|
testIdentifier?: ?string,
|
|
|
|
|}>;
|
|
|
|
|
|
|
|
type SnapshotViewNativeType = Class<NativeComponent<NativeProps>>;
|
|
|
|
|
2019-01-15 16:35:20 -08:00
|
|
|
const requireNativeComponent = require('requireNativeComponent');
|
|
|
|
|
2019-01-23 02:15:21 -08:00
|
|
|
module.exports = ((requireNativeComponent('RCTSnapshot'):any): SnapshotViewNativeType);
|