Browse Source

full and strict typescript support

master
pvincent 4 years ago
parent
commit
f34136faad
  1. 3
      .vscode/settings.json
  2. 7
      src/components/App.vue
  3. 7
      tsconfig.json

3
.vscode/settings.json

@ -1,6 +1,9 @@
{ {
"eslint.enable": true, "eslint.enable": true,
"vetur.validation.template": false, "vetur.validation.template": false,
"eslint.validate": ["javascript", "typescript", "vue"],
"vetur.experimental.templateInterpolationService": true,
"vetur.validation.script": true,
"vetur.validation.templateProps": true, "vetur.validation.templateProps": true,
"vetur.validation.interpolation": true, "vetur.validation.interpolation": true,
"editor.formatOnSave": true, "editor.formatOnSave": true,

7
src/components/App.vue

@ -31,8 +31,11 @@
<script lang="ts"> <script lang="ts">
import { defineComponent } from 'vue' import { defineComponent } from 'vue'
import Basket from './Basket.vue'
declare const APP_TITLE, APP_VERSION, APP_REPOSITORY, APP_LICENSE
import Basket from '@/components/Basket.vue'
declare const APP_TITLE: string,
APP_VERSION: string,
APP_REPOSITORY: string,
APP_LICENSE: string
export default defineComponent({ export default defineComponent({
components: { components: {

7
tsconfig.json

@ -7,6 +7,11 @@
"isolatedModules": true, "isolatedModules": true,
"resolveJsonModule": true, "resolveJsonModule": true,
"allowSyntheticDefaultImports": true, "allowSyntheticDefaultImports": true,
"noEmit": true
"noEmit": true,
"baseUrl": ".",
"strict": true,
"paths": {
"@/*": ["src/*"]
}
} }
} }
Loading…
Cancel
Save