UNPKG

@chamn/engine

Version:
14 lines (13 loc) 622 B
import { EditorProps, Monaco } from '@monaco-editor/react'; export type EditorType = EditorProps; export type MonacoEditorInstance = Parameters<Required<EditorType>['onMount']>[0]; export type MonacoEditorProps = { beforeMount?: (monaco: Monaco) => void; onDidMount?: (editor: MonacoEditorInstance) => void; options?: EditorType['options']; onChange?: EditorType['onChange']; initialValue?: string; language?: 'json' | 'javascript' | 'typescript' | 'css'; theme?: 'vs-dark' | 'light'; }; export declare const MonacoEditor: (props: MonacoEditorProps) => import("react/jsx-runtime").JSX.Element;