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 {ViewUrlSource} from 'react-devtools-shared/src/devtools/views/DevTools';
    
  15. 
    
  16. export type Context = {
    
  17.   viewUrlSourceFunction: ViewUrlSource | null,
    
  18. };
    
  19. 
    
  20. const ViewSourceContext: ReactContext<Context> = createContext<Context>(
    
  21.   ((null: any): Context),
    
  22. );
    
  23. ViewSourceContext.displayName = 'ViewSourceContext';
    
  24. 
    
  25. export default ViewSourceContext;