added type definition
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
import { invoke } from "@tauri-apps/api/tauri";
|
||||
import AutoComplete from "simple-svelte-autocomplete";
|
||||
import DisplayData from "./DisplayData.svelte";
|
||||
import type { PokemonData } from "../model/PokemonStatus";
|
||||
$: {
|
||||
if (myValue > 0 && myValue !== currentValue) {
|
||||
invoke("search", { index: myValue }).then((r) => {
|
||||
@@ -11,7 +12,7 @@
|
||||
});
|
||||
}
|
||||
pokemonStatus = {
|
||||
types: pokemonData?.types ? pokemonData.types : [],
|
||||
types: pokemonData?.types ? JSON.parse(pokemonData.types) : [],
|
||||
terastype: terastype,
|
||||
hp: hp_final,
|
||||
atk: atk_final,
|
||||
@@ -32,7 +33,7 @@
|
||||
let spatk_final = 0;
|
||||
let spdef_final = 0;
|
||||
let spd_final = 0;
|
||||
export let pokemonStatus = {
|
||||
export let pokemonStatus: PokemonData = {
|
||||
types: [],
|
||||
terastype: [0],
|
||||
hp: 0,
|
||||
|
||||
Reference in New Issue
Block a user