codex-team / codex-team/editor.js

TS2351: This expression is not constructable.

Open
#2,624 2 comments 4 reactions 0 assignees View on GitHub
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:

image

```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()
}
}, [])}
/>
}
```

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.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.