source dump of claude code
at main 21 lines 523 B view raw
1import { createContext } from 'react' 2 3export type Props = { 4 /** 5 * Exit (unmount) the whole Ink app. 6 */ 7 readonly exit: (error?: Error) => void 8} 9 10/** 11 * `AppContext` is a React context, which exposes a method to manually exit the app (unmount). 12 */ 13// eslint-disable-next-line @typescript-eslint/naming-convention 14const AppContext = createContext<Props>({ 15 exit() {}, 16}) 17 18// eslint-disable-next-line custom-rules/no-top-level-side-effects 19AppContext.displayName = 'InternalAppContext' 20 21export default AppContext