Skip to content

💡Add generics to OutputBlockData #1551

@hata6502

Description

@hata6502
  1. Describe a problem.
    By using Generics, Editor.js users can describe string literal types.

https://www.typescriptlang.org/docs/handbook/literal-types.html#string-literal-types

By using string literal types in OutputBlockData['type'], Editor.js users can describe more type-safe OutputData in each application.

  1. Describe the solution you'd like. Mockups are welcome.
    See:
    https://github.com/hata6502/editorjs-examples/blob/main/examples/ExampleEditorJSData.ts#L17

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions