|
|
|
|
|
by devdoomari
3224 days ago
|
|
> lets you write templates with HTML attributes that's somewhat bothersome... does it typecheck on compile time? hope vue works on typescript-language-specs compliant plugin... As for react, there's TSX (typescript-jsx) that works great (typechecks on props, state, etc.), but I haven't tried it with vue. |
|
Type checking for props and state inside the <script> tags is fully supported: https://vuejs.org/v2/guide/typescript.html
If you want type checks for inline <template> code (which isn't suitable for anything non-trivial, you should use computed properties or methods instead), see https://github.com/DanielRosenwasser/typescript-vue-tutorial
If you are using uncompiled components (newbies using script embeds) with no build step at all, there are clearly no compile time checks. IMO this is why Vue is significantly more newbie friendly.