NativeDevSettings.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. /**
  2. * Copyright (c) Facebook, Inc. and its 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. * @flow strict-local
  8. * @format
  9. */
  10. 'use strict';
  11. import type {TurboModule} from '../../TurboModule/RCTExport';
  12. import * as TurboModuleRegistry from '../../TurboModule/TurboModuleRegistry';
  13. export interface Spec extends TurboModule {
  14. +reload: () => void;
  15. +reloadWithReason?: (reason: string) => void;
  16. +onFastRefresh?: () => void;
  17. +setHotLoadingEnabled: (isHotLoadingEnabled: boolean) => void;
  18. +setIsDebuggingRemotely: (isDebuggingRemotelyEnabled: boolean) => void;
  19. +setProfilingEnabled: (isProfilingEnabled: boolean) => void;
  20. +toggleElementInspector: () => void;
  21. +addMenuItem: (title: string) => void;
  22. // Events
  23. +addListener: (eventName: string) => void;
  24. +removeListeners: (count: number) => void;
  25. // iOS only.
  26. +setIsShakeToShowDevMenuEnabled: (enabled: boolean) => void;
  27. }
  28. export default (TurboModuleRegistry.getEnforcing<Spec>('DevSettings'): Spec);