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 {ReactContext} from 'shared/ReactTypes';
    
  11. 
    
  12. import {createContext} from 'react';
    
  13. 
    
  14. import type {
    
  15.   CanViewElementSource,
    
  16.   ViewElementSource,
    
  17. } from 'react-devtools-shared/src/devtools/views/DevTools';
    
  18. 
    
  19. export type Context = {
    
  20.   canViewElementSourceFunction: CanViewElementSource | null,
    
  21.   viewElementSourceFunction: ViewElementSource | null,
    
  22. };
    
  23. 
    
  24. const ViewElementSourceContext: ReactContext<Context> = createContext<Context>(
    
  25.   ((null: any): Context),
    
  26. );
    
  27. ViewElementSourceContext.displayName = 'ViewElementSourceContext';
    
  28. 
    
  29. export default ViewElementSourceContext;