@hexeo/vue-typescript-jsx
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.2 • Public • Published

    vue-typescript-jsx

    Usage

    tsconfig.json

    {
      "compilerOptions": {
        "jsx": "react",
        "jsxFactory": "h",
      }
    }
    import Vue from 'vue'
    import VueTSX from 'vue-typescript-jsx'
     
    Vue.use(VueTSX)
     
    ...

    Limitations

    Spread/Merge props

    Spread and merge of props are not supported by typescript compiler.

    <div class="a" {...{class: 'b'}} />

    This will not result in

    {
      class{
        atrue,
        btrue
      }
    }

    but in

    {
      class'b'
    }

    input, textarea, options, select literal values

    Literal values will be passed to domProps-value.

    <input value="some value" />

    will generate the following in the VDOM Data

    {
      domProps{
        value'some value'
      }
    }

    h auto-injection

    There is no h auto-injection, you should provide it.

    render(hVue.CreateElement) {
      return <div />
    }
    get value() {
      const h = this.$createElement
      return <div />
    }

    Install

    npm i @hexeo/vue-typescript-jsx

    DownloadsWeekly Downloads

    2

    Version

    2.0.2

    License

    MIT

    Unpacked Size

    20.1 kB

    Total Files

    6

    Last publish

    Collaborators

    • hexeo