Mottie / Keyboard

Virtual Keyboard using jQuery ~
http://mottie.github.io/Keyboard/
Other
1.78k stars 723 forks source link

Using with Typescript #570

Open bsurai opened 7 years ago

bsurai commented 7 years ago

Hi. I'd like to use virtual-keyboard with typescript. Do you have a typescript definition file/package?

Mottie commented 7 years ago

Hi @bsurai!

This was mentioned in #502, but I haven't written anything in Typescript so I am not sure what a definition file/package would need to include.

I am in the process of rewriting this plugin using pure JS - see #559. If you would like to help contribute, let me know.

bsurai commented 7 years ago

Perhaps, I will have to do it. I will let you know, when I will have result.

bsurai commented 7 years ago

@Mottie. I've got some result. Here is .zip with type definition file and example how to use it in typescript. It was enough for me at the moment. typings.zip

Mottie commented 7 years ago

Awesome! Thank you for sharing. I'll take a look, but would you be willing to set up a repository for that code with your example? Or would you rather submit a PR, and I'll add you as a contributor so you can help me maintain it?

bsurai commented 7 years ago

Ok. I will.

bsurai commented 7 years ago

Hi @Mottie. What folder can I use for typescript example?

Mottie commented 7 years ago

It is a working example? Either way, you can add it to the docs folder... if it isn't a working example, then add a block showing the code. I can update the index page if you don't want to deal with that part of it.

bsurai commented 7 years ago

I have a new working example with some changes.

bsurai commented 7 years ago

I did something better. There is public definition with example and instruction. It was checked and accepted by http://definitelytyped.org/. https://www.npmjs.com/package/@types/virtual-keyboard https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/virtual-keyboard

Mottie commented 7 years ago

Awesome!

Would you please update the readme: