uiwjs / react-codemirror

CodeMirror 6 component for React. @codemirror https://uiwjs.github.io/react-codemirror/
https://uiwjs.github.io/react-codemirror/
MIT License
1.5k stars 125 forks source link

TS2322: Type 'LanguageSupport | StreamLanguage | null' is not assignable to type 'Extension'. #621

Open ywww opened 5 months ago

ywww commented 5 months ago
                <CodeMirror
                    style={{fontSize: fontSize, fontFamily: fontFamily}}
                    value={value}
                    width={'100%'}
                    theme={themes[theme]}
                    basicSetup={{tabSize: 2}}
                    indentWithTab={true}
                    readOnly={disabled}
                    height={height || 200 + 'px'}
                    extensions={[loadLanguage("yaml"),EditorView.lineWrapping]}
                    onChange={this.props.onChange}
                />

TS2322: Type 'LanguageSupport | StreamLanguage | null' is not assignable to type 'Extension'.

jaywcjlove commented 5 months ago

@ywww If you can provide an example that reproduces the error, I can help you take a look.