hyperhype / hyperscript

Create HyperText with JavaScript.
MIT License
2.64k stars 110 forks source link

Any TypeScript examples? #89

Open balupton opened 5 years ago

alshdavid commented 5 years ago

I'm currently this far:

yarn add hyperscript @types/hyperscript
import h from 'hyperscript'

const d = h('div', 'hi', {
    styles: {
        backgroundColor: 'black',
        color: 'white'
    }
})

document.body.appendChild(d)

Though in Angular it asks me to use because of the ESModuleInterop feature

import * as h from 'hyperscript'