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

Type Definitions (TypeScript) #5

Open
guytepper opened this issue Mar 6, 2021 · 3 comments
Open

Type Definitions (TypeScript) #5

guytepper opened this issue Mar 6, 2021 · 3 comments

Comments

@guytepper
Copy link

Hi @kinging123 & @avrahamcornfeld :)
First off, big thanks for this magical library. It's a pleasure to use.

I am using TypeScript for my project, and importing Ivrita and using it's methods emits warnings since there are no types here.

Could you maybe consider adding types if you have some free time available?

@kinging123
Copy link
Member

Hi Guy!

Glad to hear, please let us know where you're using it so we can showcase your projects on our website :)

Do you need a strict .d.ts file, or is adding JSDoc to the exported functions enough?
I know that some TypeScript engines and IDEs support JSDoc, and it'll be much easier for us to produce and maintain.

Also, feel free to add the definitions yourself, we will be happy to assist and correct along the way and would appreciate the headstart.

@guytepper
Copy link
Author

Seems like it's possible to generate d.ts file from JSDoc (The .d.ts file is needed to avoid the warnings).

It's being used in https://github.com/act-1/native, a mobile app which is still in development.
I'll let you know once it becomes publicly available :)

@kinging123
Copy link
Member

Hi, sorry for the delay in response. Your tip was awesome - I have now added type definitions for all the exported features (and more) of Ivrita! 🥳

It's all in the type-definitions branch, and once we feel it's stable enough (since some changes in the actual code had to be made) we will push it to the main branch.

I would love to hear your feedback about this, so let me know if I've done something incorrectly or inconveniently.

Please take a look at the custom switch feature, which I think will be useful to you. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants