UNPKG

@codesandbox/sandpack-react

Version:

<img style="width:100%" src="https://user-images.githubusercontent.com/4838076/143581035-ebee5ba2-9cb1-4fe8-a05b-2f44bd69bb4b.gif" alt="Component toolkit for live running code editing experiences" />

16 lines (15 loc) 499 B
import type { SandpackConsoleData } from "./utils/getType"; /** * It provides an interface to consume the logs from a sandpack client. * * @category Hooks */ export declare const useSandpackConsole: ({ clientId, maxMessageCount, showSyntaxError, resetOnPreviewRestart, }: { clientId?: string | undefined; maxMessageCount?: number | undefined; showSyntaxError?: boolean | undefined; resetOnPreviewRestart: boolean; }) => { logs: SandpackConsoleData; reset: () => void; };