TypeScript interface doesn't work as expected with '*.vue' files. it doesn't throw any "warning" when provided type is bad. Example form vue.js file:
<script lang="ts">
interface Test {
w: string;
h: number;
}
// This part of code doesn't work.
// It doesn't show any message about
// type incompatibility
//(propert h must have "number" type).
let myVar: Test = {
w: "10",
h: "26",
};
//At the same time this code works correctly in '.ts' files.
</script>
TypeScript interface doesn't work as expected with '*.vue' files. it doesn't throw any "warning" when provided type is bad. Example form vue.js file:
My devDependencies info:
I use:
Laravel framework(use 'WebPack', 'laravel-mix' - that gives default webpack setting and opportunity to modify them)
About typescript+vuejs configuration: I was using this instructions to configure my VueJs project: https://github.com/Microsoft/TypeScript-Vue-Starter . According to them I installed next NPM packages: