vue-typescript
vue-typescript copied to clipboard
tsx
Hi, wondering how to get TSX to work?
I followed general tsx advise from: https://basarat.gitbooks.io/typescript/content/docs/jsx/tsx.html
- Use files with the extension .tsx (instead of .ts).
- Use "jsx" : "react" in your tsconfig.json's compilerOptions.
- Install the definitions for JSX and React into your project : (typings install dt~react --save && typings install dt~react-dom --save).
- Import react into your .tsx files (import * as React from "react").
However, I get this error:
Types of property 'template' are incompatible. Type 'Element' is not assignable to type 'string'