-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Awesome WYSIWYG but needs type definitions #54
Comments
Hey, I never worked with typescript so I'm not sure what I can do for you. |
I'm currently working on this one. |
I've opened a PR adding some basic typescript support but it would make sense to think about it just after getting the whole components refactoring done. @philippkuehn, should we make TS support a goal for 1.x? |
Unfortunately the lack of support for typescript is a show stopper for me. |
Because of missing type defs I decided to created my own files, for my needs. So I created a folder "typedefs" with two files "tiptap.d.ts" and "tiptap-extensions.d.ts". For me it was the error problem of TypeScript that it can't build w/o having a type def file. I think because of the strict mode, but I don't want to change it. Here is my gist: https://gist.github.com/Chris2011/511597c9b95850e1fd08fefa93dec9fb. So It is kind of easy. It is not perfect but for me it worked and the error went away. What you need to do is to put the files into the typedefs folder on the root node of the project and this to your tsconfig.json: |
I've been using tiptap at work in a number of projects and since we rely heavily on TypeScript, I've been slowly building out the type definitions on an as-needed basis. While it is by no means comprehensive in its current state, nevertheless, I believe it'll be helpful for anyone using tiptap until v2 is production ready. I've submitted a pull-request #550 which will provide type definitions for the most common use cases and it should work immediately when tiptap is imported as an npm package. If the PR is accepted I hope that the community will build upon it and help improve it until v2 comes. |
@IntelX Failing the pull request, you can always submit the types to the https://github.com/DefinitelyTyped/DefinitelyTyped project. |
Would love some official types! |
Hi, We would like to use this package but support for typescript is fairly vital. Is there any word on support in v2, or submitting the types to the DefinitelyTyped project, or merging in #550 so that we can work on typescript support collaboratively until v2 is ready? Thanks. |
+1 for the need for typescript support. Is there a reason to not accept the pr specified above? EDIT: Ok, I found the note from earlier today that you are rewriting v2 in Typescript and v2 is where the typescript support will be available. |
Yes, we decided to rewrite tiptap 2 in TypeScript. 🎉 See #547 (comment) |
Hello, I would like to thank you for creating such an awesome Vue component and I would love to use it. However, we need to use typescript and then importing your editor will only cause compile time errors due to missing type definitions. Could I suggest making these available on definitelyTyped?
I am currently looking into solving this myself but as I am neither familiar with your code base nor creating type definitions at this level I thought I should see if someone can help or give pointers.
The text was updated successfully, but these errors were encountered: