codex-team / editor.js

A block-style editor with clean JSON output
https://editorjs.io
Apache License 2.0
28.69k stars 2.08k forks source link

Publish TS types #495

Closed gohabereg closed 5 years ago

gohabereg commented 5 years ago

Publish typescript types to DefinitelyTyped repository or to own organization on npmjs.org

gohabereg commented 5 years ago

Following the typescript documentation it is better to include declaration files to the package.

We have types definition for EditorJS class and some definitions for Tools. For now I think it's better to just store everything in @editorjs/editorjs package.

So if you need to implement BlockTool interface you need to install core package:

import {BlockTool} from '@editorjs/editorjs';

class MyTool implements BlockTool {

}