Added missing types. Updated dependencies

This commit is contained in:
Martin Berg Alstad 2023-03-28 23:43:02 +02:00
parent 05da28d73e
commit 28a8258710
3 changed files with 17 additions and 11 deletions

View File

@ -9,19 +9,19 @@
},
"license": "MIT",
"devDependencies": {
"autoprefixer": "^10.4.13",
"autoprefixer": "^10.4.14",
"postcss": "^8.4.21",
"tailwindcss": "^3.2.7",
"typescript": "^4.9.5",
"vite": "^4.1.4",
"vite-plugin-solid": "^2.5.0"
"tailwindcss": "^3.3.0",
"typescript": "^5.0.2",
"vite": "^4.2.1",
"vite-plugin-solid": "^2.6.1"
},
"dependencies": {
"@types/diff": "^5.0.2",
"@types/diff": "^5.0.3",
"diff": "^5.1.0",
"solid-headless": "^0.13.1",
"solid-heroicons": "^3.1.1",
"solid-js": "^1.6.11",
"solid-js": "^1.6.16",
"xlsx": "^0.18.5"
}
}

View File

@ -1,9 +1,15 @@
/* @refresh reload */
import type { FetchResultsProps, WebWorkerProps } from '../types/interfaces';
onmessage = async (e) => {
onmessage = async (e: MessageEvent<WebWorkerProps>) => {
console.log("Worker: Message received from main script")
const { expression, simplifyEnabled, hideValue, sortValue, hideIntermediates }: WebWorkerProps = e.data;
const {
expression,
simplifyEnabled,
hideValue,
sortValue,
hideIntermediates
} = e.data;
const result: FetchResultsProps = {
fetchResult: null,

View File

@ -120,8 +120,8 @@ hide=${ hideValues().value }&sort=${ sortValues().value }&hideIntermediate=${ hi
worker.postMessage(input);
worker.onmessage = (e): void => {
const data: FetchResultsProps = e.data;
worker.onmessage = (e: MessageEvent<FetchResultsProps>): void => {
const data = e.data;
setIsLoaded(true);
if (data.fetchResult) {
setFetchResult(data.fetchResult);