snabbdom / snabbdom-to-html

Render Snabbdom Vnode’s to HTML strings
94 stars 21 forks source link

Fix TypeScript type definitions #2 #24

Closed alvivi closed 7 years ago

alvivi commented 7 years ago

@acstll, @TylorS: here are the changes needed to work with this library from typescript. After updating the type definitions, I can use the library with no problems (aside from Snabbdom VNode definition).

To learn how this works internally I have "rewritten" (mostly copy pasting and adding types) the library in typescript. You can found the source in this branch. The tests are passing. I added review notes to my code (You can find these searching for 'REVIEW'). Maybe you can use this version to compare itself with your future typescript-written version or something similar.

acstll commented 7 years ago

Thank you @alvivi !

I will merge this later today and cut a release. (I'll run @cycle/dom tests against it and release 3.0 directly if everything's working.)