🐛 Fix typescript errors

main
Shad Amethyst 1 year ago
parent 91977f9f0f
commit fa2240062d

@ -1,4 +1,4 @@
import { createEffect, createSignal, onCleanup } from "solid-js";
import { createSignal, onCleanup } from "solid-js";
import { applyMovesGenerator, type State } from "../../game.ts";
import { unwrap } from "solid-js/store";
import clone from "../../clone.ts";
@ -84,7 +84,7 @@ export default function useAnimation(
return {
start() {
const stateClone = clone(unwrap(state));
const generator: Generator<State, State, unknown> = applyMovesGenerator(stateClone, true);
const generator = applyMovesGenerator(stateClone, true) as Generator<State, undefined, unknown>;
setTemporaryState(clone(stateClone));
start(generator);
},

@ -1,6 +1,6 @@
import { createMemo, type Accessor, type Resource, createResource } from "solid-js";
import { createMemo, type Accessor, createResource } from "solid-js";
import * as game from "../../game.js";
import { loadTileImages, type TileImages } from "../tiles.js";
import { loadTileImages } from "../tiles.js";
import * as draw from "./draw.js";
import type { Tool } from "../Toolbar.js";
import type { AnimationState } from "./useAnimation.ts";

Loading…
Cancel
Save