fix typescript vscode errors

This commit is contained in:
b1ek 2023-08-26 19:57:08 +10:00
parent 4a4a51d424
commit 3c3251837a
Signed by: blek
GPG Key ID: 14546221E3595D0C
7 changed files with 19 additions and 13 deletions

View File

@ -25,7 +25,8 @@
"@sveltejs/adapter-static": "^1.0.0-next.50", "@sveltejs/adapter-static": "^1.0.0-next.50",
"@sveltejs/vite-plugin-svelte": "^2.0.0", "@sveltejs/vite-plugin-svelte": "^2.0.0",
"@tauri-apps/cli": "^1.4.0", "@tauri-apps/cli": "^1.4.0",
"@tsconfig/svelte": "^3.0.0", "@tsconfig/svelte": "^5.0.2",
"@types/lodash": "^4.14.197",
"@types/node": "^18.7.10", "@types/node": "^18.7.10",
"sass": "^1.65.1", "sass": "^1.65.1",
"svelte": "^3.54.0", "svelte": "^3.54.0",

6
src/index.d.ts vendored
View File

@ -1,5 +1 @@
declare module './App.svelte' {} declare const NODE_ENV: string;
export {}
export const NODE_ENV: string

View File

@ -1,6 +1,8 @@
import App from "./App.svelte";
import '@fontsource-variable/red-hat-display'; import '@fontsource-variable/red-hat-display';
// @ts-ignore
import App from "./App.svelte";
import './lib/global_styles.scss'; import './lib/global_styles.scss';
// disable left click // disable left click

View File

@ -1,12 +1,13 @@
<script lang="ts"> <script lang="ts">
import style from './style.module.scss'; import style from './style.module.scss';
// @ts-ignore
import Jumper from 'svelte-loading-spinners/Jumper.svelte'; import Jumper from 'svelte-loading-spinners/Jumper.svelte';
import { invoke } from '@tauri-apps/api/tauri'; import { invoke } from '@tauri-apps/api/tauri';
import { back } from '../../store/RouteStore'; import { back } from '../../store/RouteStore';
let list = []; let list: any[] = [];
let loaded = false; let loaded = false;
let loaded_fade_anim = false; let loaded_fade_anim = false;

View File

@ -33,7 +33,7 @@ const store = configureStore({
export default store; export default store;
export function route(path) { export function route(path: string) {
store.dispatch({ type: 'setPath', path }); store.dispatch({ type: 'setPath', path });
store.dispatch({ type: 'addHistory', path }); store.dispatch({ type: 'addHistory', path });
} }

View File

@ -3,6 +3,7 @@ import { svelte } from "@sveltejs/vite-plugin-svelte";
import sveltePreprocess from "svelte-preprocess"; import sveltePreprocess from "svelte-preprocess";
// https://vitejs.dev/config/ // https://vitejs.dev/config/
// @ts-ignore
export default defineConfig(() => ({ export default defineConfig(() => ({
plugins: [ plugins: [
svelte({ svelte({

View File

@ -274,10 +274,15 @@
"@tauri-apps/cli-win32-ia32-msvc" "1.4.0" "@tauri-apps/cli-win32-ia32-msvc" "1.4.0"
"@tauri-apps/cli-win32-x64-msvc" "1.4.0" "@tauri-apps/cli-win32-x64-msvc" "1.4.0"
"@tsconfig/svelte@^3.0.0": "@tsconfig/svelte@^5.0.2":
version "3.0.0" version "5.0.2"
resolved "https://registry.yarnpkg.com/@tsconfig/svelte/-/svelte-3.0.0.tgz#b06e059209f04c414de0069f2f0e2796d979fc6f" resolved "https://registry.yarnpkg.com/@tsconfig/svelte/-/svelte-5.0.2.tgz#c9ed3575c5445afb14965bb76e8446fbf7e4a0e6"
integrity sha512-pYrtLtOwku/7r1i9AMONsJMVYAtk3hzOfiGNekhtq5tYBGA7unMve8RvUclKLMT3PrihvJqUmzsRGh0RP84hKg== integrity sha512-BRbo1fOtyVbhfLyuCWw6wAWp+U8UQle+ZXu84MYYWzYSEB28dyfnRBIE99eoG+qdAC0po6L2ScIEivcT07UaMA==
"@types/lodash@^4.14.197":
version "4.14.197"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.197.tgz#e95c5ddcc814ec3e84c891910a01e0c8a378c54b"
integrity sha512-BMVOiWs0uNxHVlHBgzTIqJYmj+PgCo4euloGF+5m4okL3rEYzM2EEv78mw8zWSMM57dM7kVIgJ2QDvwHSoCI5g==
"@types/node@^18.7.10": "@types/node@^18.7.10":
version "18.17.4" version "18.17.4"