Skip to content
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

Closed
jardaroh opened this issue Oct 8, 2018 · 11 comments
Closed

Awesome WYSIWYG but needs type definitions #54

jardaroh opened this issue Oct 8, 2018 · 11 comments
Labels
Type: Feature The issue or pullrequest is a new feature

Comments

@jardaroh
Copy link

jardaroh commented Oct 8, 2018

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.

@philippkuehn
Copy link
Contributor

Hey, I never worked with typescript so I'm not sure what I can do for you.

@erickwilder
Copy link
Contributor

I'm currently working on this one.

@erickwilder
Copy link
Contributor

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?

@philippkuehn philippkuehn added the Type: Feature The issue or pullrequest is a new feature label Oct 20, 2018
@gerryhigh
Copy link

Unfortunately the lack of support for typescript is a show stopper for me.

@Chris2011
Copy link

Chris2011 commented Sep 4, 2019

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: "files": ["./typedefs/tiptap.d.ts", "./typedefs/tiptap-extensions.d.ts"],. As I said, not perfect but you can add whatever you need to add to it.

@billylam12
Copy link
Contributor

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.

@douglasg14b
Copy link

@IntelX Failing the pull request, you can always submit the types to the https://github.com/DefinitelyTyped/DefinitelyTyped project.

@net8floz
Copy link

net8floz commented Mar 4, 2020

Would love some official types!

@philipwhitesysarb
Copy link

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.

@gregveres
Copy link

gregveres commented Aug 26, 2020

+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.

@hanspagel
Copy link
Contributor

Yes, we decided to rewrite tiptap 2 in TypeScript. 🎉

See #547 (comment)

@hanspagel hanspagel pinned this issue Aug 31, 2020
@hanspagel hanspagel unpinned this issue Sep 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature The issue or pullrequest is a new feature
Projects
None yet
Development

No branches or pull requests