(defaultValue: T)
| 2 | import { ReactContext } from 'shared/ReactTypes'; |
| 3 | |
| 4 | export function createContext<T>(defaultValue: T): ReactContext<T> { |
| 5 | const context: ReactContext<T> = { |
| 6 | $$typeof: REACT_CONTEXT_TYPE, |
| 7 | Provider: null, |
| 8 | _currentValue: defaultValue |
| 9 | }; |
| 10 | context.Provider = { |
| 11 | $$typeof: REACT_PROVIDER_TYPE, |
| 12 | _context: context |
| 13 | }; |
| 14 | return context; |
| 15 | } |
no outgoing calls
no test coverage detected