diff --git a/nginx/vue/package-lock.json b/nginx/vue/package-lock.json index 6e5873a..377f693 100644 --- a/nginx/vue/package-lock.json +++ b/nginx/vue/package-lock.json @@ -16,6 +16,7 @@ "markdown-it-wikilinks": "^1.4.0", "pinia": "^3.0.4", "tailwindcss": "^4.1.18", + "typescript": "^5.9.3", "vue": "^3.5.22", "vue-router": "^4.6.3" }, @@ -1939,13 +1940,13 @@ "license": "MIT" }, "node_modules/axios": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.2.tgz", - "integrity": "sha512-VPk9ebNqPcy5lRGuSlKx752IlDatOjT9paPlm8A7yOuW2Fbvp4X3JznJtT4f0GzGLLiWE9W8onz51SqLYwzGaA==", + "version": "1.13.5", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.5.tgz", + "integrity": "sha512-cz4ur7Vb0xS4/KUN0tPWe44eqxrIu31me+fbang3ijiNscE129POzipJJA6zniq2C/Z6sJCjMimjS8Lc/GAs8Q==", "license": "MIT", "dependencies": { - "follow-redirects": "^1.15.6", - "form-data": "^4.0.4", + "follow-redirects": "^1.15.11", + "form-data": "^4.0.5", "proxy-from-env": "^1.1.0" } }, @@ -3382,6 +3383,19 @@ "utf8-byte-length": "^1.0.1" } }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, "node_modules/uc.micro": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-2.1.0.tgz", diff --git a/nginx/vue/package.json b/nginx/vue/package.json index 8180ff3..34bbba3 100644 --- a/nginx/vue/package.json +++ b/nginx/vue/package.json @@ -20,6 +20,7 @@ "markdown-it-wikilinks": "^1.4.0", "pinia": "^3.0.4", "tailwindcss": "^4.1.18", + "typescript": "^5.9.3", "vue": "^3.5.22", "vue-router": "^4.6.3" }, diff --git a/nginx/vue/src/views/home/Intro2.vue b/nginx/vue/src/views/home/Intro2.vue index 1cfb9eb..faceddf 100644 --- a/nginx/vue/src/views/home/Intro2.vue +++ b/nginx/vue/src/views/home/Intro2.vue @@ -10,8 +10,8 @@ interface Item { content: string } -const container = ref(null) -const itemEls = ref([]) +const container = ref < HTMLDivElement | null > (null) +const itemEls = ref < HTMLDivElement[] > ([]) const phrases = [ 'Welcome to my website', @@ -22,7 +22,7 @@ const phrases = [ "Always watching too much youtube" ] -const items = ref( +const items = ref < Item[] > ( phrases.map((text, i) => ({ x: i * 20, y: i * 20, diff --git a/nginx/vue/tsconfig.json b/nginx/vue/tsconfig.json new file mode 100644 index 0000000..c7b1632 --- /dev/null +++ b/nginx/vue/tsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "target": "esnext", + "module": "esnext", + "moduleResolution": "node", + "importHelpers": true, + "isolatedModules": true, + "noEmit": true + } +}