ueberdosis / tiptap

The headless rich text editor framework for web artisans.
https://tiptap.dev
MIT License
27.68k stars 2.3k forks source link

Build issue with TS definitions for @tiptap/extension-placeholder #2330

Closed asitparida closed 2 years ago

asitparida commented 2 years ago

What’s the bug you are facing?

I am exporting a controlled RTE edtior built on top of tiptap for use across other projects. The packages I am using

"@tiptap/react": "2.0.0-beta.77", "@tiptap/starter-kit": "2.0.0-beta.115", "@tiptap/extension-link": "2.0.0-beta.20", "@tiptap/extension-placeholder": "2.0.0-beta.45", "ts-loader": "^8.0.17", "typescript": "^3.9.2"

I keep running into the issue - node_modules/@tiptap/extension-placeholder/dist/packages/extension-placeholder/src/placeholder.d.ts:15:35 - error TS2707: Generic type 'Extension' requires between 0 and 1 type arguments.

export declare const Placeholder: Extension<PlaceholderOptions, any>;



### How can we reproduce the bug on our side?

Working on providing better repro steps.

### Can you provide a CodeSandbox?

_No response_

### What did you expect to happen?

On checking other extension builds, seemsthat the Extension Generic requires only one argument. 

export declare const Paragraph: Node<ParagraphOptions>;
export declare const OrderedList: Node<OrderedListOptions>;
etc. 

### Anything to add? (optional)

_No response_

### Did you update your dependencies?

- [X] Yes, I’ve updated my dependencies to use the latest version of all packages.

### Are you sponsoring us?

- [ ] Yes, I’m a sponsor. 💖
asitparida commented 2 years ago

Might be a versioning issue brought upon my a new version of TS. Works fine if I switch to an earlier version. Further repro on my end I guess.