| 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 | // Renderers that don't support mutation |
| 11 | // can re-export everything from this module. |
| 12 | |
| 13 | function shim(...args: any): any { |
| 14 | throw new Error( |
| 15 | 'The current renderer does not support Singletons. ' + |
| 16 | 'This error is likely caused by a bug in React. ' + |
| 17 | 'Please file an issue.', |
| 18 | ); |
| 19 | } |
| 20 | |
| 21 | // Resources (when unsupported) |
| 22 | export const supportsSingletons = false; |
| 23 | export const resolveSingletonInstance = shim; |
| 24 | export const acquireSingletonInstance = shim; |
| 25 | export const releaseSingletonInstance = shim; |
| 26 | export const isHostSingletonType = shim; |
| 27 | export const isSingletonScope = shim; |