import BraftEditor, { ControlType } from 'braft-editor'
对于默认属性
BraftEditor
:
const BraftEditorNoSSR = dynamic(import('braft-editor'), {ssr: false})
的非默认属性/符号如何
ControlType
?
./DraftEditor.tsx:11:42
Type error: Property 'ControlType' does not exist on type 'typeof import("/project/node_modules/braft-editor/index")'.
9 | const BraftEditor = dynamic(import('braft-editor'), {ssr: false})
10 | const ControlType = dynamic(() =>
> 11 | import('braft-editor').then(lib => lib.ControlType), {ssr: false}
| ^
12 | );
13 | const CLASS_NAME = 'MuiEditor-root'
14 | const useStyles = makeStyles((theme: Theme) => ({
npm ERR! Lifecycle script `build` failed with error:
npm ERR! Error: command failed
npm ERR! in workspace: @app/lib@0.0.1
npm ERR! at location: /project/packages/lib