News for hackers. Stuff that matters.
Re:TypeScript 2.3 by octref on Thursday April 27, 2017 @01:14PM (#14213124)
Author of vetur[0] here, glad to see it getting featured :-)

Started this plugin last October to provide better editor support for Vue single file component, now vetur has support for embedded IntelliSense / error-checking / syntax-highlighting / emmet / snippet / linting / formatting. By embedded support I mean each feature is available for at least html/css/js, some features are also available for scss/less/ts/etc.

@sandersn from TS team has been really helpful in helping me integrating TS's Language Server to powers the advanced IntelliSense in vetur. As vue / vuex / vue-router now comes with type definitions, you get awesome auto completion such as [1] and [2].

Now that IntelliSense in js/ts sections is almost complete, vetur's next step is to use TS's Language Server to extract info from Vue SFC's script part to power IntelliSense in templates, such as prompting a list of `props` for `v-if`, and prompting a list of `methods` for `@click`.

Give it a try and let me know any bugs or features you want to see!

[0]: https://github.com/octref/vetur [1]: https://twitter.com/octref/status/854812632142024705 [2]: https://twitter.com/octref/status/857350977581723648

Re:TypeScript 2.3 by ronjouch on Thursday April 27, 2017 @01:54PM (#14213435)
Vetur is awesome! Thanks octref for your continued work and support :)

The "feature" I'd like to see most is a "perfect setup" guide (or maybe auto-detecting-and-helping logic?) detailing what's required to get all the features working. Currently for example I don't get HTML/CSS formatting, even though it was featured in 0.6.0 changelog, but I have no idea why :-/ . Got this feeling a few times with vetur as well as other linters: things work, but maybe not 100%, and it can be opaque to dig deeper: is it due to vscode misconfiguration? vetur misconfiguration? missing tooling? I don't know.

EDIT: these TS-dependent auto-completions look fantastic. I'm planning to migrate my current Vue project to TS, but for now it's just JS. Do you have any recommendation for Vue2-with-TypeScript documentation? Or, even better, a JS-to-TS Vue2 migration guide?

Re:TypeScript 2.3 by octref on Thursday April 27, 2017 @02:12PM (#14213588)
I'll write a blog post about a recommended setup soon. Indeed there are some configuration required for getting all the features working, and they aren't really well-documented now.
Re:TypeScript 2.3 by crooked-v on Thursday April 27, 2017 @04:10PM (#14214284)
To go with this, I would be incredibly happy just to find a complete guide for Webpack + Babel + TS + Vue. The last time I tried I could never quite get anything put together all the way.
Re:TypeScript 2.3 by xenreal on Friday April 28, 2017 @05:06AM (#14217944)
I used already configured template for such setup: https://github.com/AbeHaruhiko/vue-webpack-typescript
Re:TypeScript 2.3 by mycall on Friday April 28, 2017 @02:46AM (#14217341)
Why use Babel + TS?