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 hydration
    
  11. // can re-export everything from this module.
    
  12. 
    
  13. function shim(...args: any): empty {
    
  14.   throw new Error(
    
  15.     'The current renderer does not support Resources. ' +
    
  16.       'This error is likely caused by a bug in React. ' +
    
  17.       'Please file an issue.',
    
  18.   );
    
  19. }
    
  20. 
    
  21. export type HoistableRoot = mixed;
    
  22. export type Resource = mixed;
    
  23. 
    
  24. // Resources (when unsupported)
    
  25. export const supportsResources = false;
    
  26. export const isHostHoistableType = shim;
    
  27. export const getHoistableRoot = shim;
    
  28. export const getResource = shim;
    
  29. export const acquireResource = shim;
    
  30. export const releaseResource = shim;
    
  31. export const hydrateHoistable = shim;
    
  32. export const mountHoistable = shim;
    
  33. export const unmountHoistable = shim;
    
  34. export const createHoistableInstance = shim;
    
  35. export const prepareToCommitHoistables = shim;
    
  36. export const mayResourceSuspendCommit = shim;
    
  37. export const preloadResource = shim;
    
  38. export const suspendResource = shim;