UNPKG

webcontainer-sandbox-react

Version:

A React component library for WebContainer-based code sandboxes

21 lines (20 loc) 608 B
import { default as React } from 'react'; export interface SessionError { message: string; from?: string; type: 'terminal' | 'browser'; } interface WebContainerProviderProps { sessionKey: string; initFiles: Array<{ name: string; content: string; }>; buildCommand?: string; startCommand?: string; children: React.ReactNode; fileObservers?: Record<string, (content: string, pre?: string) => Promise<void>>; onError?: (error: SessionError) => void; } declare const SessionProvider: React.FC<WebContainerProviderProps>; export default SessionProvider;