UNPKG

897 BTypeScriptView Raw
1/**
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 *
7 * @format
8 */
9
10import {NativeEventEmitter} from '../EventEmitter/NativeEventEmitter';
11
12/**
13 * The DevSettings module exposes methods for customizing settings for developers in development.
14 */
15export interface DevSettingsStatic extends NativeEventEmitter {
16 /**
17 * Adds a custom menu item to the developer menu.
18 *
19 * @param title - The title of the menu item. Is internally used as id and should therefore be unique.
20 * @param handler - The callback invoked when pressing the menu item.
21 */
22 addMenuItem(title: string, handler: () => any): void;
23
24 /**
25 * Reload the application.
26 *
27 * @param reason
28 */
29 reload(reason?: string): void;
30}
31
32export const DevSettings: DevSettingsStatic;