import { createContext } from 'react' ; import type { IServiceInjector } from './IApp' ; export const appContext = createContext < IServiceInjector > ( undefined as any ) ; interface IProps { app : IServiceInjector ; } export const AppContext = function AppContext ( { app , children } ) { return < appContext . Provider value = { app } > { children } < /appContext.Provider>; } ;