react-code-canvas
Version:
Package to run and preview React code with live editing capabilities in a browser.
6 lines (5 loc) • 330 B
TypeScript
import { ReactElement } from 'react';
import { RunnerOptions, Scope } from './types';
export declare const generateElement: (options: RunnerOptions) => ReactElement | null;
export declare const createRequire: (imports?: Scope) => (module: string) => Scope;
export declare const importCode: (code: string, scope?: Scope) => Scope;