codex-team / codex-team/editor.js
TS2351: This expression is not constructable.
Open
good first issue
- Dominant language
- TypeScript
- Stars
- 31.9k
- Forks
- 2.2k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 1
Description
Steps to reproduce:
1. Change moduleResolution to `node16` or `nodenext` in tsconfig.json
Expected behavior:
Type is correct
Screenshots:
```tsx
'use client'
import EditorJS from '@editorjs/editorjs'
import { useCallback, useRef } from 'react'
export const Editor = () => {
const editorRef = useRef(null)
return
{
if (ref) {
editorRef.current = new EditorJS({
holder: ref
})
} else {
editorRef.current?.destroy()
}
}, [])}
/>
}
```
if (ref) {
editorRef.current = new EditorJS({
holder: ref
})
} else {
editorRef.current?.destroy()
}
}, [])}
/>
}
```
Device, Browser, OS:
Editor.js version: latest
Plugins you use with their versions:
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.