Skip to content

Commit

Permalink
fix tsc
Browse files Browse the repository at this point in the history
  • Loading branch information
tom-james-watson committed Apr 23, 2021
1 parent a5caa67 commit 28c0dc1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 35 deletions.
8 changes: 8 additions & 0 deletions @types/tween-functions.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
declare module "tween-functions" {
export const easeOutCirc: (
currentTime: number,
beginValue: number,
endValue: number,
totalDuration: number
) => number;
}
12 changes: 3 additions & 9 deletions components/game.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ import {
DropResult,
FluidDragActions,
SensorAPI,
SnapDragActions,
} from "react-beautiful-dnd";
import { Item, PlayedItem } from "../types/item";
import NextItemList from "./next-item-list";
import PlayedItemList from "./played-item-list";
import styles from "../styles/game.module.scss";
import useWindowSize from "./useWindowSize";

function noop() {}
function noop() {
// noop
}

interface State {
badlyPlaced: {
Expand Down Expand Up @@ -45,10 +45,6 @@ function checkCorrect(
return { correct: true, delta: 0 };
}

function wait(ms: number) {
return new Promise((res) => setTimeout(res, ms));
}

function moveStepByStep(
drag: FluidDragActions,
transformValues: number[],
Expand Down Expand Up @@ -208,8 +204,6 @@ export default function Game() {
next: null,
played: [],
});
const size = useWindowSize();

function getRandomItem(deck: Item[], played: Item[]): Item {
let next: Item;

Expand Down
26 changes: 0 additions & 26 deletions components/useWindowSize.tsx

This file was deleted.

1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"compilerOptions": {
"typeRoots": ["@types", "node_modules/@types"],
"target": "es5",
"lib": [
"dom",
Expand Down

0 comments on commit 28c0dc1

Please sign in to comment.