mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
549cac63cb
Summary: This diff adds reloadWithReason to the NativeDevSettings and updates the exposed DevSettings.reload method to send to it if it's available (setting an 'uncategorized' reason if one isn't set. [General][Feature] Update DevSettings.reload to accept a reason Reviewed By: RSNara Differential Revision: D17499343 fbshipit-source-id: e8c9724800f93d3b9a5d2a8fe9f689d51947d39b
30 lines
939 B
JavaScript
30 lines
939 B
JavaScript
/**
|
|
* 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.
|
|
*
|
|
* @flow strict-local
|
|
* @format
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
import type {TurboModule} from '../../TurboModule/RCTExport';
|
|
import * as TurboModuleRegistry from '../../TurboModule/TurboModuleRegistry';
|
|
|
|
export interface Spec extends TurboModule {
|
|
+reload: () => void;
|
|
+reloadWithReason?: (reason: string) => void;
|
|
+setHotLoadingEnabled: (isHotLoadingEnabled: boolean) => void;
|
|
+setIsDebuggingRemotely: (isDebuggingRemotelyEnabled: boolean) => void;
|
|
+setProfilingEnabled: (isProfilingEnabled: boolean) => void;
|
|
+toggleElementInspector: () => void;
|
|
+addMenuItem: (title: string) => void;
|
|
|
|
// iOS only.
|
|
+setIsShakeToShowDevMenuEnabled: (enabled: boolean) => void;
|
|
}
|
|
|
|
export default (TurboModuleRegistry.getEnforcing<Spec>('DevSettings'): Spec);
|