| 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 | * @flow |
| 8 | */ |
| 9 | |
| 10 | import type {EventPriority} from 'react-reconciler/src/ReactEventPriorities'; |
| 11 | import type {HostDispatcher} from './shared/ReactDOMTypes'; |
| 12 | |
| 13 | import {NoEventPriority} from 'react-reconciler/src/ReactEventPriorities'; |
| 14 | |
| 15 | import noop from 'shared/noop'; |
| 16 | |
| 17 | type ReactDOMInternals = { |
| 18 | Events: [any, any, any, any, any, any], |
| 19 | d /* ReactDOMCurrentDispatcher */: HostDispatcher, |
| 20 | p /* currentUpdatePriority */: EventPriority, |
| 21 | findDOMNode: |
| 22 | | null |
| 23 | | ((componentOrElement: component(...props: any)) => null | Element | Text), |
| 24 | }; |
| 25 | |
| 26 | const DefaultDispatcher: HostDispatcher = { |
| 27 | f /* flushSyncWork */: noop, |
| 28 | r /* requestFormReset */: noop, |
| 29 | D /* prefetchDNS */: noop, |
| 30 | C /* preconnect */: noop, |
| 31 | L /* preload */: noop, |
| 32 | m /* preloadModule */: noop, |
| 33 | X /* preinitScript */: noop, |
| 34 | S /* preinitStyle */: noop, |
| 35 | M /* preinitModuleScript */: noop, |
| 36 | }; |
| 37 | |
| 38 | const Internals: ReactDOMInternals = { |
| 39 | Events: null as any, |
| 40 | d /* ReactDOMCurrentDispatcher */: DefaultDispatcher, |
| 41 | p /* currentUpdatePriority */: NoEventPriority, |
| 42 | findDOMNode: null, |
| 43 | }; |
| 44 | |
| 45 | export default Internals; |