2017-05-06 03:50:47 +00:00
|
|
|
/**
|
2018-09-11 22:27:47 +00:00
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
2017-05-06 03:50:47 +00:00
|
|
|
*
|
2018-02-17 02:24:55 +00:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2017-05-06 03:50:47 +00:00
|
|
|
*
|
2018-05-11 20:32:37 +00:00
|
|
|
* @format
|
2018-06-20 07:35:29 +00:00
|
|
|
* @flow strict
|
2017-05-06 03:50:47 +00:00
|
|
|
*/
|
2018-05-11 20:32:37 +00:00
|
|
|
|
2017-05-06 03:50:47 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
export type RNTesterBackAction = {
|
|
|
|
type: 'RNTesterBackAction',
|
|
|
|
};
|
|
|
|
|
|
|
|
export type RNTesterListAction = {
|
|
|
|
type: 'RNTesterListAction',
|
|
|
|
};
|
|
|
|
|
|
|
|
export type RNTesterExampleAction = {
|
|
|
|
type: 'RNTesterExampleAction',
|
|
|
|
openExample: string,
|
|
|
|
};
|
|
|
|
|
2018-05-11 20:32:37 +00:00
|
|
|
export type RNTesterAction =
|
|
|
|
| RNTesterBackAction
|
|
|
|
| RNTesterListAction
|
|
|
|
| RNTesterExampleAction;
|
2017-05-06 03:50:47 +00:00
|
|
|
|
|
|
|
function Back(): RNTesterBackAction {
|
|
|
|
return {
|
|
|
|
type: 'RNTesterBackAction',
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
function ExampleList(): RNTesterListAction {
|
|
|
|
return {
|
|
|
|
type: 'RNTesterListAction',
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
function ExampleAction(openExample: string): RNTesterExampleAction {
|
|
|
|
return {
|
|
|
|
type: 'RNTesterExampleAction',
|
|
|
|
openExample,
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
const RNTesterActions = {
|
|
|
|
Back,
|
|
|
|
ExampleList,
|
|
|
|
ExampleAction,
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = RNTesterActions;
|