WICG / handwriting-recognition

Handwriting Recognition Web API Proposal
https://wicg.github.io/handwriting-recognition/
Other
75 stars 17 forks source link

TypeScript Definitions #19

Open christianliebel opened 3 years ago

christianliebel commented 3 years ago

If it's helpful for further development, I've created TypeScript definition files based on the current WebIDLs here: https://github.com/christianliebel/handwriting-textarea/blob/main/handwriting-recognition.d.ts

Just wanted to bring this to your attention, feel free to close this issue right away. 😇

wacky6 commented 3 years ago

Awesome! Thanks for contributing.

Do you mind if I put a link to this d.ts file in README?

Also, graphemeSet is in Web IDL now. You can uncomment that line in TS definition.

christianliebel commented 3 years ago

Do you mind if I put a link to this d.ts file in README?

@wacky6 Sure, no problem!

You can uncomment that line in TS definition

Done.

wacky6 commented 3 years ago

Thanks.

My collegues suggest we should try to upstream TS definitions to DefinitivelyTyped repository after the API is more stable. We prefer to not upstream it now, in case this API get too popular and make it hard for us to iterate on the design.

Are you willing to stay updated about API changes, and update the definition in the future?

christianliebel commented 3 years ago

My collegues suggest we should try to upstream TS definitions to DefinitivelyTyped repository after the API is more stable. We prefer to not upstream it now, in case this API get too popular and make it hard for us to iterate on the design.

Looks like typings for DOM APIs should go here and would automatically be generated from WebIDLs provided by Microsoft Edge. But I'm not sure at which stage APIs are included there. So it looks as if the typings from above would only fill in the gap until the API is generally available on Edge one day.

Are you willing to stay updated about API changes, and update the definition in the future?

Yes.

wacky6 commented 3 years ago

Oh. Interesting. It seems we need to wait until the spec is "mostly" finalized before we can generate d.ts automatically. Let's keep the hand-crafted d.ts around for now.

We'll keep you updated of the API changes.

Thanks for your contribution!