2.0.2 • Published 6 years ago

@hexeo/vue-typescript-jsx v2.0.2

Weekly downloads
1
License
MIT
Repository
github
Last release
6 years ago

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: {
    a: true,
    b: true
  }
}

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(h: Vue.CreateElement) {
  return <div />
}
get value() {
  const h = this.$createElement
  return <div />
}
2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.0.6

6 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago