vue-for-idea icon indicating copy to clipboard operation
vue-for-idea copied to clipboard

TypeScript support?

Open amcsi opened this issue 9 years ago • 1 comments

Would it be possible to support TypeScript with some kind of attribute on the script tag?

To be honest, I'm not entirely sure whether it's even possible to use Vue component files together with typescript without the use of separate ts files. But if that were ever possible, it would be so cool if I could have all the component logic in 1 file without having to create another file just for the TS code

amcsi avatar Jul 09 '16 11:07 amcsi

It definitely is possible. I just followed this blog post http://www.mindissoftware.com/Vue-Sample-in-Typescript/ and successfully got the example to work. In the vue file the tag <script> has to be replaced by <script lang="ts">.

maccesch avatar Jan 14 '17 14:01 maccesch