Skip to content

Unable to use in typescript project #785

@ColinFrick

Description

@ColinFrick

I'm currently evaluating different wysiwyg editor projects (Slate, Quill, Tiptap) and I wanted to check mobile doc out.

Sadly I get following errors when trying to use it:

Error: node_modules/mobiledoc-kit/dist/mobiledoc.d.ts:406:9 - error TS2611: 'isBlank' is defined as a property in class '{ _tagName: string | null; tagName: string; isValidTagName(normalizedTagName: string): boolean; type: Type; isSection: boolean; isMarkerable: boolean; isNested: boolean; isListItem: boolean; ... 20 more ...; prev: any; }', but is overridden here in 'Markerable' as an accessor.

406     get isBlank(): boolean;
            ~~~~~~~


Error: node_modules/mobiledoc-kit/dist/mobiledoc.d.ts:437:9 - error TS2611: 'length' is defined as a property in class '{ _tagName: string | null; tagName: string; isValidTagName(normalizedTagName: string): boolean; type: Type; isSection: boolean; isMarkerable: boolean; isNested: boolean; isListItem: boolean; ... 20 more ...; prev: any; }', but is overridden here in 'Markerable' as an accessor.

437     get length(): number;
            ~~~~~~


Error: node_modules/mobiledoc-kit/dist/mobiledoc.d.ts:515:9 - error TS2611: 'post' is defined as a property in class 'Markerable', but is overridden here in 'ListItem' as an accessor.

515     get post(): Option<Post> | undefined;
            ~~~~


Error: node_modules/mobiledoc-kit/dist/mobiledoc.d.ts:562:9 - error TS2611: 'isBlank' is defined as a property in class '{ _tagName: string | null; tagName: string; isValidTagName(normalizedTagName: string): boolean; type: Type; isSection: boolean; isMarkerable: boolean; isNested: boolean; isListItem: boolean; ... 20 more ...; prev: any; } & Attributable', but is overridden here in 'ListSection' as an accessor.

562     get isBlank(): boolean;
            ~~~~~~~

I'm using typescript 4.8.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions